1 "use strict";//
  2 /*! jQuery v2.1.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
  3 !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m=a.document,n="2.1.0",o=function(a,b){return new o.fn.init(a,b)},p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};o.fn=o.prototype={jquery:n,constructor:o,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=o.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return o.each(this,a,b)},map:function(a){return this.pushStack(o.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},o.extend=o.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||o.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(o.isPlainObject(d)||(e=o.isArray(d)))?(e?(e=!1,f=c&&o.isArray(c)?c:[]):f=c&&o.isPlainObject(c)?c:{},g[b]=o.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},o.extend({expando:"jQuery"+(n+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===o.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isPlainObject:function(a){if("object"!==o.type(a)||a.nodeType||o.isWindow(a))return!1;try{if(a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(b){return!1}return!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=o.trim(a),a&&(1===a.indexOf("use strict")?(b=m.createElement("script"),b.text=a,m.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":k.call(a)},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?o.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),o.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||o.guid++,f):void 0},now:Date.now,support:l}),o.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=o.type(a);return"function"===c||o.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);o.find=t,o.expr=t.selectors,o.expr[":"]=o.expr.pseudos,o.unique=t.uniqueSort,o.text=t.getText,o.isXMLDoc=t.isXML,o.contains=t.contains;var u=o.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(o.isFunction(b))return o.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return o.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return o.filter(b,a,c);b=o.filter(b,a)}return o.grep(a,function(a){return g.call(b,a)>=0!==c})}o.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?o.find.matchesSelector(d,a)?[d]:[]:o.find.matches(a,o.grep(b,function(a){return 1===a.nodeType}))},o.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(o(a).filter(function(){for(b=0;c>b;b++)if(o.contains(e[b],this))return!0}));for(b=0;c>b;b++)o.find(a,e[b],d);return d=this.pushStack(c>1?o.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?o(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=o.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof o?b[0]:b,o.merge(this,o.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:m,!0)),v.test(c[1])&&o.isPlainObject(b))for(c in b)o.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=m.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=m,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):o.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(o):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),o.makeArray(a,this))};A.prototype=o.fn,y=o(m);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};o.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&o(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),o.fn.extend({has:function(a){var b=o(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(o.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?o(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&o.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?o.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(o(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(o.unique(o.merge(this.get(),o(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}o.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return o.dir(a,"parentNode")},parentsUntil:function(a,b,c){return o.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return o.dir(a,"nextSibling")},prevAll:function(a){return o.dir(a,"previousSibling")},nextUntil:function(a,b,c){return o.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return o.dir(a,"previousSibling",c)},siblings:function(a){return o.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return o.sibling(a.firstChild)},contents:function(a){return a.contentDocument||o.merge([],a.childNodes)}},function(a,b){o.fn[a]=function(c,d){var e=o.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=o.filter(d,e)),this.length>1&&(C[a]||o.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return o.each(a.match(E)||[],function(a,c){b[c]=!0}),b}o.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):o.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){o.each(b,function(b,c){var d=o.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&o.each(arguments,function(a,b){var c;while((c=o.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?o.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},o.extend({Deferred:function(a){var b=[["resolve","done",o.Callbacks("once memory"),"resolved"],["reject","fail",o.Callbacks("once memory"),"rejected"],["notify","progress",o.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return o.Deferred(function(c){o.each(b,function(b,f){var g=o.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&o.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?o.extend(a,d):d}},e={};return d.pipe=d.then,o.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&o.isFunction(a.promise)?e:0,g=1===f?a:o.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&o.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;o.fn.ready=function(a){return o.ready.promise().done(a),this},o.extend({isReady:!1,readyWait:1,holdReady:function(a){a?o.readyWait++:o.ready(!0)},ready:function(a){(a===!0?--o.readyWait:o.isReady)||(o.isReady=!0,a!==!0&&--o.readyWait>0||(H.resolveWith(m,[o]),o.fn.trigger&&o(m).trigger("ready").off("ready")))}});function I(){m.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),o.ready()}o.ready.promise=function(b){return H||(H=o.Deferred(),"complete"===m.readyState?setTimeout(o.ready):(m.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},o.ready.promise();var J=o.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===o.type(c)){e=!0;for(h in c)o.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,o.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(o(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};o.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=o.expando+Math.random()}K.uid=1,K.accepts=o.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,o.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(o.isEmptyObject(f))o.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,o.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{o.isArray(b)?d=b.concat(b.map(o.camelCase)):(e=o.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!o.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?o.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}o.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),o.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;
  4 while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=o.camelCase(d.slice(5)),P(f,d,e[d]));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=o.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),o.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||o.isArray(c)?d=L.access(a,b,o.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=o.queue(a,b),d=c.length,e=c.shift(),f=o._queueHooks(a,b),g=function(){o.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:o.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),o.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?o.queue(this[0],a):void 0===b?this:this.each(function(){var c=o.queue(this,a,b);o._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&o.dequeue(this,a)})},dequeue:function(a){return this.each(function(){o.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=o.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===o.css(a,"display")||!o.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=m.createDocumentFragment(),b=a.appendChild(m.createElement("div"));b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";l.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return m.activeElement}catch(a){}}o.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=o.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof o!==U&&o.event.triggered!==b.type?o.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],n=q=h[1],p=(h[2]||"").split(".").sort(),n&&(l=o.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=o.event.special[n]||{},k=o.extend({type:n,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&o.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(n,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),o.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],n=q=h[1],p=(h[2]||"").split(".").sort(),n){l=o.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||o.removeEvent(a,n,r.handle),delete i[n])}else for(n in i)o.event.remove(a,n+b[j],c,d,!0);o.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,p=[d||m],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||m,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+o.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[o.expando]?b:new o.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:o.makeArray(c,[b]),n=o.event.special[q]||{},e||!n.trigger||n.trigger.apply(d,c)!==!1)){if(!e&&!n.noBubble&&!o.isWindow(d)){for(i=n.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||m)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:n.bindType||q,l=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),l&&l.apply(g,c),l=k&&g[k],l&&l.apply&&o.acceptData(g)&&(b.result=l.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||n._default&&n._default.apply(p.pop(),c)!==!1||!o.acceptData(d)||k&&o.isFunction(d[q])&&!o.isWindow(d)&&(h=d[k],h&&(d[k]=null),o.event.triggered=q,d[q](),o.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=o.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=o.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=o.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((o.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?o(e,this).index(i)>=0:o.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||m,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[o.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new o.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=m),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&o.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return o.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=o.extend(new o.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?o.event.trigger(e,null,b):o.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},o.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},o.Event=function(a,b){return this instanceof o.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.getPreventDefault&&a.getPreventDefault()?Z:$):this.type=a,b&&o.extend(this,b),this.timeStamp=a&&a.timeStamp||o.now(),void(this[o.expando]=!0)):new o.Event(a,b)},o.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z,this.stopPropagation()}},o.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){o.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!o.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.focusinBubbles||o.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){o.event.simulate(b,a.target,o.event.fix(a),!0)};o.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),o.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return o().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=o.guid++)),this.each(function(){o.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,o(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){o.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){o.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?o.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ib={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return o.nodeName(a,"table")&&o.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)o.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=o.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&o.nodeName(a,b)?o.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}o.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=o.contains(a.ownerDocument,a);if(!(l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||o.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,n=a.length;n>m;m++)if(e=a[m],e||0===e)if("object"===o.type(e))o.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;o.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===o.inArray(e,d))&&(i=o.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f,g,h=o.event.special,i=0;void 0!==(c=a[i]);i++){if(o.acceptData(c)&&(f=c[L.expando],f&&(b=L.cache[f]))){if(d=Object.keys(b.events||{}),d.length)for(g=0;void 0!==(e=d[g]);g++)h[e]?o.event.remove(c,e):o.removeEvent(c,e,b.handle);L.cache[f]&&delete L.cache[f]}delete M.cache[c[M.expando]]}}}),o.fn.extend({text:function(a){return J(this,function(a){return void 0===a?o.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?o.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||o.cleanData(ob(c)),c.parentNode&&(b&&o.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(o.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return o.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(o.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,o.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,n=k-1,p=a[0],q=o.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(c=o.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=o.map(ob(c,"script"),kb),g=f.length;k>j;j++)h=c,j!==n&&(h=o.clone(h,!0,!0),g&&o.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,o.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&o.contains(i,h)&&(h.src?o._evalUrl&&o._evalUrl(h.src):o.globalEval(h.textContent.replace(hb,"")))}return this}}),o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){o.fn[a]=function(a){for(var c,d=[],e=o(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),o(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d=o(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:o.css(d[0],"display");return d.detach(),e}function tb(a){var b=m,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||o("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||o.contains(a.ownerDocument,a)||(g=o.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",e=m.documentElement,f=m.createElement("div"),g=m.createElement("div");g.style.backgroundClip="content-box",g.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===g.style.backgroundClip,f.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",f.appendChild(g);function h(){g.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",e.appendChild(f);var d=a.getComputedStyle(g,null);b="1%"!==d.top,c="4px"===d.width,e.removeChild(f)}a.getComputedStyle&&o.extend(l,{pixelPosition:function(){return h(),b},boxSizingReliable:function(){return null==c&&h(),c},reliableMarginRight:function(){var b,c=g.appendChild(m.createElement("div"));return c.style.cssText=g.style.cssText=d,c.style.marginRight=c.style.width="0",g.style.width="1px",e.appendChild(f),b=!parseFloat(a.getComputedStyle(c,null).marginRight),e.removeChild(f),g.innerHTML="",b}})}(),o.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:0,fontWeight:400},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=o.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=o.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=o.css(a,"border"+R[f]+"Width",!0,e))):(g+=o.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=o.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===o.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):f[g]||(e=S(d),(c&&"none"!==c||!e)&&L.set(d,"olddisplay",e?c:o.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}o.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=o.camelCase(b),i=a.style;return b=o.cssProps[h]||(o.cssProps[h]=Fb(i,h)),g=o.cssHooks[b]||o.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(o.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||o.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]="",i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=o.camelCase(b);return b=o.cssProps[h]||(o.cssProps[h]=Fb(a.style,h)),g=o.cssHooks[b]||o.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||o.isNumeric(f)?f||0:e):e}}),o.each(["height","width"],function(a,b){o.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&zb.test(o.css(a,"display"))?o.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===o.css(a,"boxSizing",!1,e),e):0)}}}),o.cssHooks.marginRight=yb(l.reliableMarginRight,function(a,b){return b?o.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),o.each({margin:"",padding:"",border:"Width"},function(a,b){o.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(o.cssHooks[a+b].set=Gb)}),o.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(o.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=o.css(a,b[g],!1,d);return f}return void 0!==c?o.style(a,b,c):o.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?o(this).show():o(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}o.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(o.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?o.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=o.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){o.fx.step[a.prop]?o.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[o.cssProps[a.prop]]||o.cssHooks[a.prop])?o.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},o.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},o.fx=Kb.prototype.init,o.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(o.cssNumber[a]?"":"px"),g=(o.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(o.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,o.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=o.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k=this,l={},m=a.style,n=a.nodeType&&S(a),p=L.get(a,"fxshow");c.queue||(h=o._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,k.always(function(){k.always(function(){h.unqueued--,o.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[m.overflow,m.overflowX,m.overflowY],j=o.css(a,"display"),"none"===j&&(j=tb(a.nodeName)),"inline"===j&&"none"===o.css(a,"float")&&(m.display="inline-block")),c.overflow&&(m.overflow="hidden",k.always(function(){m.overflow=c.overflow[0],m.overflowX=c.overflow[1],m.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(n?"hide":"show")){if("show"!==e||!p||void 0===p[d])continue;n=!0}l[d]=p&&p[d]||o.style(a,d)}if(!o.isEmptyObject(l)){p?"hidden"in p&&(n=p.hidden):p=L.access(a,"fxshow",{}),f&&(p.hidden=!n),n?o(a).show():k.done(function(){o(a).hide()}),k.done(function(){var b;L.remove(a,"fxshow");for(b in l)o.style(a,b,l[b])});for(d in l)g=Ub(n?p[d]:0,d,k),d in p||(p[d]=g.start,n&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=o.camelCase(c),e=b[d],f=a[c],o.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=o.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=o.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:o.extend({},b),opts:o.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=o.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return o.map(k,Ub,j),o.isFunction(j.opts.start)&&j.opts.start.call(a,j),o.fx.timer(o.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}o.Animation=o.extend(Xb,{tweener:function(a,b){o.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),o.speed=function(a,b,c){var d=a&&"object"==typeof a?o.extend({},a):{complete:c||!c&&b||o.isFunction(a)&&a,duration:a,easing:c&&b||b&&!o.isFunction(b)&&b};return d.duration=o.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in o.fx.speeds?o.fx.speeds[d.duration]:o.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){o.isFunction(d.old)&&d.old.call(this),d.queue&&o.dequeue(this,d.queue)},d},o.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=o.isEmptyObject(a),f=o.speed(b,c,d),g=function(){var b=Xb(this,o.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=o.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&o.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=o.timers,g=d?d.length:0;for(c.finish=!0,o.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),o.each(["toggle","show","hide"],function(a,b){var c=o.fn[b];o.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),o.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){o.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),o.timers=[],o.fx.tick=function(){var a,b=0,c=o.timers;for(Lb=o.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||o.fx.stop(),Lb=void 0},o.fx.timer=function(a){o.timers.push(a),a()?o.fx.start():o.timers.pop()},o.fx.interval=13,o.fx.start=function(){Mb||(Mb=setInterval(o.fx.tick,o.fx.interval))},o.fx.stop=function(){clearInterval(Mb),Mb=null},o.fx.speeds={slow:600,fast:200,_default:400},o.fn.delay=function(a,b){return a=o.fx?o.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=m.createElement("input"),b=m.createElement("select"),c=b.appendChild(m.createElement("option"));a.type="checkbox",l.checkOn=""!==a.value,l.optSelected=c.selected,b.disabled=!0,l.optDisabled=!c.disabled,a=m.createElement("input"),a.value="t",a.type="radio",l.radioValue="t"===a.value}();var Yb,Zb,$b=o.expr.attrHandle;o.fn.extend({attr:function(a,b){return J(this,o.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){o.removeAttr(this,a)})}}),o.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?o.prop(a,b,c):(1===f&&o.isXMLDoc(a)||(b=b.toLowerCase(),d=o.attrHooks[b]||(o.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=o.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void o.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=o.propFix[c]||c,o.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&o.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?o.removeAttr(a,c):a.setAttribute(c,c),c}},o.each(o.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||o.find.attr;$b[b]=function(a,b,d){var e,f;
  5 return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;o.fn.extend({prop:function(a,b){return J(this,o.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[o.propFix[a]||a]})}}),o.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!o.isXMLDoc(a),f&&(b=o.propFix[b]||b,e=o.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),l.optSelected||(o.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),o.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){o.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;o.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(o.isFunction(a))return this.each(function(b){o(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=o.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(o.isFunction(a))return this.each(function(b){o(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?o.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(o.isFunction(a)?function(c){o(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=o(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;o.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=o.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,o(this).val()):a,null==e?e="":"number"==typeof e?e+="":o.isArray(e)&&(e=o.map(e,function(a){return null==a?"":a+""})),b=o.valHooks[this.type]||o.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=o.valHooks[e.type]||o.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),o.extend({valHooks:{select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&o.nodeName(c.parentNode,"optgroup"))){if(b=o(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=o.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=o.inArray(o(d).val(),f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),o.each(["radio","checkbox"],function(){o.valHooks[this]={set:function(a,b){return o.isArray(b)?a.checked=o.inArray(o(a).val(),b)>=0:void 0}},l.checkOn||(o.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),o.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){o.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),o.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=o.now(),dc=/\?/;o.parseJSON=function(a){return JSON.parse(a+"")},o.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&o.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \t]*([^\r\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\/\//,mc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=m.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(o.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,o.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=o.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&o.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}o.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":o.parseJSON,"text xml":o.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,o.ajaxSettings),b):tc(o.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=o.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?o(l):o.event,n=o.Deferred(),p=o.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(n.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=o.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=o.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===o.active++&&o.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(o.lastModified[d]&&v.setRequestHeader("If-Modified-Since",o.lastModified[d]),o.etag[d]&&v.setRequestHeader("If-None-Match",o.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(o.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(o.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?n.resolveWith(l,[r,x,v]):n.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--o.active||o.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return o.get(a,b,c,"json")},getScript:function(a,b){return o.get(a,void 0,b,"script")}}),o.each(["get","post"],function(a,b){o[b]=function(a,c,d,e){return o.isFunction(c)&&(e=e||d,d=c,c=void 0),o.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),o.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){o.fn[b]=function(a){return this.on(b,a)}}),o._evalUrl=function(a){return o.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},o.fn.extend({wrapAll:function(a){var b;return o.isFunction(a)?this.each(function(b){o(this).wrapAll(a.call(this,b))}):(this[0]&&(b=o(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(o.isFunction(a)?function(b){o(this).wrapInner(a.call(this,b))}:function(){var b=o(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=o.isFunction(a);return this.each(function(c){o(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){o.nodeName(this,"body")||o(this).replaceWith(this.childNodes)}).end()}}),o.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},o.expr.filters.visible=function(a){return!o.expr.filters.hidden(a)};var wc=/%20/g,xc=/\[\]$/,yc=/\r?\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(o.isArray(b))o.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==o.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}o.param=function(a,b){var c,d=[],e=function(a,b){b=o.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=o.ajaxSettings&&o.ajaxSettings.traditional),o.isArray(a)||a.jquery&&!o.isPlainObject(a))o.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},o.fn.extend({serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=o.prop(this,"elements");return a?o.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!o(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=o(this).val();return null==c?null:o.isArray(c)?o.map(c,function(a){return{name:b.name,value:a.replace(yc,"\r\n")}}):{name:b.name,value:c.replace(yc,"\r\n")}}).get()}}),o.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=o.ajaxSettings.xhr();a.ActiveXObject&&o(a).on("unload",function(){for(var a in Dc)Dc[a]()}),l.cors=!!Fc&&"withCredentials"in Fc,l.ajax=Fc=!!Fc,o.ajaxTransport(function(a){var b;return l.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort"),f.send(a.hasContent&&a.data||null)},abort:function(){b&&b()}}:void 0}),o.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return o.globalEval(a),a}}}),o.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),o.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=o("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),m.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\?(?=&|$)|\?\?/;o.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||o.expando+"_"+cc++;return this[a]=!0,a}}),o.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=o.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||o.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&o.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),o.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||m;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=o.buildFragment([a],b,e),e&&e.length&&o(e).remove(),o.merge([],d.childNodes))};var Ic=o.fn.load;o.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h),a=a.slice(0,h)),o.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&o.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?o("<div>").append(o.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},o.expr.filters.animated=function(a){return o.grep(o.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return o.isWindow(a)?a:9===a.nodeType&&a.defaultView}o.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=o.css(a,"position"),l=o(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=o.css(a,"top"),i=o.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),o.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},o.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){o.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,o.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===o.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),o.nodeName(a[0],"html")||(d=a.offset()),d.top+=o.css(a[0],"borderTopWidth",!0),d.left+=o.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-o.css(c,"marginTop",!0),left:b.left-d.left-o.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!o.nodeName(a,"html")&&"static"===o.css(a,"position"))a=a.offsetParent;return a||Jc})}}),o.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;o.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),o.each(["top","left"],function(a,b){o.cssHooks[b]=yb(l.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?o(a).position()[b]+"px":c):void 0})}),o.each({Height:"height",Width:"width"},function(a,b){o.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){o.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return o.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?o.css(b,c,g):o.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),o.fn.size=function(){return this.length},o.fn.andSelf=o.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return o});var Lc=a.jQuery,Mc=a.$;return o.noConflict=function(b){return a.$===o&&(a.$=Mc),b&&a.jQuery===o&&(a.jQuery=Lc),o},typeof b===U&&(a.jQuery=a.$=o),o});
  6 /* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
  7    jsDate | (c) 2010-2013 Chris Leonello
  8  */(function(L){var u;L.fn.emptyForce=function(){for(var ah=0,ai;(ai=L(this)[ah])!=null;ah++){if(ai.nodeType===1){L.cleanData(ai.getElementsByTagName("*"))}if(L.jqplot.use_excanvas){ai.outerHTML=""}else{while(ai.firstChild){ai.removeChild(ai.firstChild)}}ai=null}return L(this)};L.fn.removeChildForce=function(ah){while(ah.firstChild){this.removeChildForce(ah.firstChild);ah.removeChild(ah.firstChild)}};L.fn.jqplot=function(){var ah=[];var aj=[];for(var ak=0,ai=arguments.length;ak<ai;ak++){if(L.isArray(arguments[ak])){ah.push(arguments[ak])}else{if(L.isPlainObject(arguments[ak])){aj.push(arguments[ak])}}}return this.each(function(an){var at,ar,aq=L(this),am=ah.length,al=aj.length,ap,ao;if(an<am){ap=ah[an]}else{ap=am?ah[am-1]:null}if(an<al){ao=aj[an]}else{ao=al?aj[al-1]:null}at=aq.attr("id");if(at===u){at="jqplot_target_"+L.jqplot.targetCounter++;aq.attr("id",at)}ar=L.jqplot(at,ap,ao);aq.data("jqplot",ar)})};L.jqplot=function(an,ak,ai){var aj=null,ah=null;if(arguments.length===3){aj=ak;ah=ai}else{if(arguments.length===2){if(L.isArray(ak)){aj=ak}else{if(L.isPlainObject(ak)){ah=ak}}}}if(aj===null&&ah!==null&&ah.data){aj=ah.data}var am=new R();L("#"+an).removeClass("jqplot-error");if(L.jqplot.config.catchErrors){try{am.init(an,aj,ah);am.draw();am.themeEngine.init.call(am);return am}catch(al){var ao=L.jqplot.config.errorMessage||al.message;L("#"+an).append('<div class="jqplot-error-message">'+ao+"</div>");L("#"+an).addClass("jqplot-error");document.getElementById(an).style.background=L.jqplot.config.errorBackground;document.getElementById(an).style.border=L.jqplot.config.errorBorder;document.getElementById(an).style.fontFamily=L.jqplot.config.errorFontFamily;document.getElementById(an).style.fontSize=L.jqplot.config.errorFontSize;document.getElementById(an).style.fontStyle=L.jqplot.config.errorFontStyle;document.getElementById(an).style.fontWeight=L.jqplot.config.errorFontWeight}}else{am.init(an,aj,ah);am.draw();am.themeEngine.init.call(am);return am}};L.jqplot.version="1.0.8";L.jqplot.revision="1250";L.jqplot.targetCounter=1;L.jqplot.CanvasManager=function(){if(typeof L.jqplot.CanvasManager.canvases=="undefined"){L.jqplot.CanvasManager.canvases=[];L.jqplot.CanvasManager.free=[]}var ah=[];this.getCanvas=function(){var ak;var aj=true;if(!L.jqplot.use_excanvas){for(var al=0,ai=L.jqplot.CanvasManager.canvases.length;al<ai;al++){if(L.jqplot.CanvasManager.free[al]===true){aj=false;ak=L.jqplot.CanvasManager.canvases[al];L.jqplot.CanvasManager.free[al]=false;ah.push(al);break}}}if(aj){ak=document.createElement("canvas");ah.push(L.jqplot.CanvasManager.canvases.length);L.jqplot.CanvasManager.canvases.push(ak);L.jqplot.CanvasManager.free.push(false)}return ak};this.initCanvas=function(ai){if(L.jqplot.use_excanvas){return window.G_vmlCanvasManager.initElement(ai)}return ai};this.freeAllCanvases=function(){for(var aj=0,ai=ah.length;aj<ai;aj++){this.freeCanvas(ah[aj])}ah=[]};this.freeCanvas=function(ai){if(L.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==u){window.G_vmlCanvasManager.uninitElement(L.jqplot.CanvasManager.canvases[ai]);L.jqplot.CanvasManager.canvases[ai]=null}else{var aj=L.jqplot.CanvasManager.canvases[ai];aj.getContext("2d").clearRect(0,0,aj.width,aj.height);L(aj).unbind().removeAttr("class").removeAttr("style");L(aj).css({left:"",top:"",position:""});aj.width=0;aj.height=0;L.jqplot.CanvasManager.free[ai]=true}}};L.jqplot.log=function(){if(window.console){window.console.log.apply(window.console,arguments)}};L.jqplot.config={addDomReference:false,enablePlugins:false,defaultHeight:300,defaultWidth:400,UTCAdjust:false,timezoneOffset:new Date(new Date().getTimezoneOffset()*60000),errorMessage:"",errorBackground:"",errorBorder:"",errorFontFamily:"",errorFontSize:"",errorFontStyle:"",errorFontWeight:"",catchErrors:false,defaultTickFormatString:"%.1f",defaultColors:["#4bb2c5","#EAA228","#c5b47f","#579575","#839557","#958c12","#953579","#4b5de4","#d8b83f","#ff5800","#0085cc","#c747a3","#cddf54","#FBD178","#26B4E3","#bd70c7"],defaultNegativeColors:["#498991","#C08840","#9F9274","#546D61","#646C4A","#6F6621","#6E3F5F","#4F64B0","#A89050","#C45923","#187399","#945381","#959E5C","#C7AF7B","#478396","#907294"],dashLength:4,gapLength:4,dotGapLength:2.5,srcLocation:"jqplot/src/",pluginLocation:"jqplot/src/plugins/"};L.jqplot.arrayMax=function(ah){return Math.max.apply(Math,ah)};L.jqplot.arrayMin=function(ah){return Math.min.apply(Math,ah)};L.jqplot.enablePlugins=L.jqplot.config.enablePlugins;L.jqplot.support_canvas=function(){if(typeof L.jqplot.support_canvas.result=="undefined"){L.jqplot.support_canvas.result=!!document.createElement("canvas").getContext}return L.jqplot.support_canvas.result};L.jqplot.support_canvas_text=function(){if(typeof L.jqplot.support_canvas_text.result=="undefined"){if(window.G_vmlCanvasManager!==u&&window.G_vmlCanvasManager._version>887){L.jqplot.support_canvas_text.result=true}else{L.jqplot.support_canvas_text.result=!!(document.createElement("canvas").getContext&&typeof document.createElement("canvas").getContext("2d").fillText=="function")}}return L.jqplot.support_canvas_text.result};L.jqplot.use_excanvas=((!L.support.boxModel||!L.support.objectAll||!$support.leadingWhitespace)&&!L.jqplot.support_canvas())?true:false;L.jqplot.preInitHooks=[];L.jqplot.postInitHooks=[];L.jqplot.preParseOptionsHooks=[];L.jqplot.postParseOptionsHooks=[];L.jqplot.preDrawHooks=[];L.jqplot.postDrawHooks=[];L.jqplot.preDrawSeriesHooks=[];L.jqplot.postDrawSeriesHooks=[];L.jqplot.preDrawLegendHooks=[];L.jqplot.addLegendRowHooks=[];L.jqplot.preSeriesInitHooks=[];L.jqplot.postSeriesInitHooks=[];L.jqplot.preParseSeriesOptionsHooks=[];L.jqplot.postParseSeriesOptionsHooks=[];L.jqplot.eventListenerHooks=[];L.jqplot.preDrawSeriesShadowHooks=[];L.jqplot.postDrawSeriesShadowHooks=[];L.jqplot.ElemContainer=function(){this._elem;this._plotWidth;this._plotHeight;this._plotDimensions={height:null,width:null}};L.jqplot.ElemContainer.prototype.createElement=function(ak,am,ai,aj,an){this._offsets=am;var ah=ai||"jqplot";var al=document.createElement(ak);this._elem=L(al);this._elem.addClass(ah);this._elem.css(aj);this._elem.attr(an);al=null;return this._elem};L.jqplot.ElemContainer.prototype.getWidth=function(){if(this._elem){return this._elem.outerWidth(true)}else{return null}};L.jqplot.ElemContainer.prototype.getHeight=function(){if(this._elem){return this._elem.outerHeight(true)}else{return null}};L.jqplot.ElemContainer.prototype.getPosition=function(){if(this._elem){return this._elem.position()}else{return{top:null,left:null,bottom:null,right:null}}};L.jqplot.ElemContainer.prototype.getTop=function(){return this.getPosition().top};L.jqplot.ElemContainer.prototype.getLeft=function(){return this.getPosition().left};L.jqplot.ElemContainer.prototype.getBottom=function(){return this._elem.css("bottom")};L.jqplot.ElemContainer.prototype.getRight=function(){return this._elem.css("right")};function w(ah){L.jqplot.ElemContainer.call(this);this.name=ah;this._series=[];this.show=false;this.tickRenderer=L.jqplot.AxisTickRenderer;this.tickOptions={};this.labelRenderer=L.jqplot.AxisLabelRenderer;this.labelOptions={};this.label=null;this.showLabel=true;this.min=null;this.max=null;this.autoscale=false;this.pad=1.2;this.padMax=null;this.padMin=null;this.ticks=[];this.numberTicks;this.tickInterval;this.renderer=L.jqplot.LinearAxisRenderer;this.rendererOptions={};this.showTicks=true;this.showTickMarks=true;this.showMinorTicks=true;this.drawMajorGridlines=true;this.drawMinorGridlines=false;this.drawMajorTickMarks=true;this.drawMinorTickMarks=true;this.useSeriesColor=false;this.borderWidth=null;this.borderColor=null;this.scaleToHiddenSeries=false;this._dataBounds={min:null,max:null};this._intervalStats=[];this._offsets={min:null,max:null};this._ticks=[];this._label=null;this.syncTicks=null;this.tickSpacing=75;this._min=null;this._max=null;this._tickInterval=null;this._numberTicks=null;this.__ticks=null;this._options={}}w.prototype=new L.jqplot.ElemContainer();w.prototype.constructor=w;w.prototype.init=function(){if(L.isFunction(this.renderer)){this.renderer=new this.renderer()}this.tickOptions.axis=this.name;if(this.tickOptions.showMark==null){this.tickOptions.showMark=this.showTicks}if(this.tickOptions.showMark==null){this.tickOptions.showMark=this.showTickMarks}if(this.tickOptions.showLabel==null){this.tickOptions.showLabel=this.showTicks}if(this.label==null||this.label==""){this.showLabel=false}else{this.labelOptions.label=this.label}if(this.showLabel==false){this.labelOptions.show=false}if(this.pad==0){this.pad=1}if(this.padMax==0){this.padMax=1}if(this.padMin==0){this.padMin=1}if(this.padMax==null){this.padMax=(this.pad-1)/2+1}if(this.padMin==null){this.padMin=(this.pad-1)/2+1}this.pad=this.padMax+this.padMin-1;if(this.min!=null||this.max!=null){this.autoscale=false}if(this.syncTicks==null&&this.name.indexOf("y")>-1){this.syncTicks=true}else{if(this.syncTicks==null){this.syncTicks=false}}this.renderer.init.call(this,this.rendererOptions)};w.prototype.draw=function(ah,ai){if(this.__ticks){this.__ticks=null}return this.renderer.draw.call(this,ah,ai)};w.prototype.set=function(){this.renderer.set.call(this)};w.prototype.pack=function(ai,ah){if(this.show){this.renderer.pack.call(this,ai,ah)}if(this._min==null){this._min=this.min;this._max=this.max;this._tickInterval=this.tickInterval;this._numberTicks=this.numberTicks;this.__ticks=this._ticks}};w.prototype.reset=function(){this.renderer.reset.call(this)};w.prototype.resetScale=function(ah){L.extend(true,this,{min:null,max:null,numberTicks:null,tickInterval:null,_ticks:[],ticks:[]},ah);this.resetDataBounds()};w.prototype.resetDataBounds=function(){var ao=this._dataBounds;ao.min=null;ao.max=null;var ai,ap,am;var aj=(this.show)?true:false;for(var al=0;al<this._series.length;al++){ap=this._series[al];if(ap.show||this.scaleToHiddenSeries){am=ap._plotData;if(ap._type==="line"&&ap.renderer.bands.show&&this.name.charAt(0)!=="x"){am=[[0,ap.renderer.bands._min],[1,ap.renderer.bands._max]]}var ah=1,an=1;if(ap._type!=null&&ap._type=="ohlc"){ah=3;an=2}for(var ak=0,ai=am.length;ak<ai;ak++){if(this.name=="xaxis"||this.name=="x2axis"){if((am[ak][0]!=null&&am[ak][0]<ao.min)||ao.min==null){ao.min=am[ak][0]}if((am[ak][0]!=null&&am[ak][0]>ao.max)||ao.max==null){ao.max=am[ak][0]}}else{if((am[ak][ah]!=null&&am[ak][ah]<ao.min)||ao.min==null){ao.min=am[ak][ah]}if((am[ak][an]!=null&&am[ak][an]>ao.max)||ao.max==null){ao.max=am[ak][an]}}}if(aj&&ap.renderer.constructor!==L.jqplot.BarRenderer){aj=false}else{if(aj&&this._options.hasOwnProperty("forceTickAt0")&&this._options.forceTickAt0==false){aj=false}else{if(aj&&ap.renderer.constructor===L.jqplot.BarRenderer){if(ap.barDirection=="vertical"&&this.name!="xaxis"&&this.name!="x2axis"){if(this._options.pad!=null||this._options.padMin!=null){aj=false}}else{if(ap.barDirection=="horizontal"&&(this.name=="xaxis"||this.name=="x2axis")){if(this._options.pad!=null||this._options.padMin!=null){aj=false}}}}}}}}if(aj&&this.renderer.constructor===L.jqplot.LinearAxisRenderer&&ao.min>=0){this.padMin=1;this.forceTickAt0=true}};function q(ah){L.jqplot.ElemContainer.call(this);this.show=false;this.location="ne";this.labels=[];this.showLabels=true;this.showSwatches=true;this.placement="insideGrid";this.xoffset=0;this.yoffset=0;this.border;this.background;this.textColor;this.fontFamily;this.fontSize;this.rowSpacing="0.5em";this.renderer=L.jqplot.TableLegendRenderer;this.rendererOptions={};this.preDraw=false;this.marginTop=null;this.marginRight=null;this.marginBottom=null;this.marginLeft=null;this.escapeHtml=false;this._series=[];L.extend(true,this,ah)}q.prototype=new L.jqplot.ElemContainer();q.prototype.constructor=q;q.prototype.setOptions=function(ah){L.extend(true,this,ah);if(this.placement=="inside"){this.placement="insideGrid"}if(this.xoffset>0){if(this.placement=="insideGrid"){switch(this.location){case"nw":case"w":case"sw":if(this.marginLeft==null){this.marginLeft=this.xoffset+"px"}this.marginRight="0px";break;case"ne":case"e":case"se":default:if(this.marginRight==null){this.marginRight=this.xoffset+"px"}this.marginLeft="0px";break}}else{if(this.placement=="outside"){switch(this.location){case"nw":case"w":case"sw":if(this.marginRight==null){this.marginRight=this.xoffset+"px"}this.marginLeft="0px";break;case"ne":case"e":case"se":default:if(this.marginLeft==null){this.marginLeft=this.xoffset+"px"}this.marginRight="0px";break}}}this.xoffset=0}if(this.yoffset>0){if(this.placement=="outside"){switch(this.location){case"sw":case"s":case"se":if(this.marginTop==null){this.marginTop=this.yoffset+"px"}this.marginBottom="0px";break;case"ne":case"n":case"nw":default:if(this.marginBottom==null){this.marginBottom=this.yoffset+"px"}this.marginTop="0px";break}}else{if(this.placement=="insideGrid"){switch(this.location){case"sw":case"s":case"se":if(this.marginBottom==null){this.marginBottom=this.yoffset+"px"}this.marginTop="0px";break;case"ne":case"n":case"nw":default:if(this.marginTop==null){this.marginTop=this.yoffset+"px"}this.marginBottom="0px";break}}}this.yoffset=0}};q.prototype.init=function(){if(L.isFunction(this.renderer)){this.renderer=new this.renderer()}this.renderer.init.call(this,this.rendererOptions)};q.prototype.draw=function(ai,aj){for(var ah=0;ah<L.jqplot.preDrawLegendHooks.length;ah++){L.jqplot.preDrawLegendHooks[ah].call(this,ai)}return this.renderer.draw.call(this,ai,aj)};q.prototype.pack=function(ah){this.renderer.pack.call(this,ah)};function y(ah){L.jqplot.ElemContainer.call(this);this.text=ah;this.show=true;this.fontFamily;this.fontSize;this.textAlign;this.textColor;this.renderer=L.jqplot.DivTitleRenderer;this.rendererOptions={};this.escapeHtml=false}y.prototype=new L.jqplot.ElemContainer();y.prototype.constructor=y;y.prototype.init=function(){if(L.isFunction(this.renderer)){this.renderer=new this.renderer()}this.renderer.init.call(this,this.rendererOptions)};y.prototype.draw=function(ah){return this.renderer.draw.call(this,ah)};y.prototype.pack=function(){this.renderer.pack.call(this)};function S(ah){ah=ah||{};L.jqplot.ElemContainer.call(this);this.show=true;this.xaxis="xaxis";this._xaxis;this.yaxis="yaxis";this._yaxis;this.gridBorderWidth=2;this.renderer=L.jqplot.LineRenderer;this.rendererOptions={};this.data=[];this.gridData=[];this.label="";this.showLabel=true;this.color;this.negativeColor;this.lineWidth=2.5;this.lineJoin="round";this.lineCap="round";this.linePattern="solid";this.shadow=true;this.shadowAngle=45;this.shadowOffset=1.25;this.shadowDepth=3;this.shadowAlpha="0.1";this.breakOnNull=false;this.markerRenderer=L.jqplot.MarkerRenderer;this.markerOptions={};this.showLine=true;this.showMarker=true;this.index;this.fill=false;this.fillColor;this.fillAlpha;this.fillAndStroke=false;this.disableStack=false;this._stack=false;this.neighborThreshold=4;this.fillToZero=false;this.fillToValue=0;this.fillAxis="y";this.useNegativeColors=true;this._stackData=[];this._plotData=[];this._plotValues={x:[],y:[]};this._intervals={x:{},y:{}};this._prevPlotData=[];this._prevGridData=[];this._stackAxis="y";this._primaryAxis="_xaxis";this.canvas=new L.jqplot.GenericCanvas();this.shadowCanvas=new L.jqplot.GenericCanvas();this.plugins={};this._sumy=0;this._sumx=0;this._type=""}S.prototype=new L.jqplot.ElemContainer();S.prototype.constructor=S;S.prototype.init=function(ak,ao,am){this.index=ak;this.gridBorderWidth=ao;var an=this.data;var aj=[],al,ah;for(al=0,ah=an.length;al<ah;al++){if(!this.breakOnNull){if(an[al]==null||an[al][0]==null||an[al][1]==null){continue}else{aj.push(an[al])}}else{aj.push(an[al])}}this.data=aj;if(!this.color){this.color=am.colorGenerator.get(this.index)}if(!this.negativeColor){this.negativeColor=am.negativeColorGenerator.get(this.index)}if(!this.fillColor){this.fillColor=this.color}if(this.fillAlpha){var ai=L.jqplot.normalize2rgb(this.fillColor);var ai=L.jqplot.getColorComponents(ai);this.fillColor="rgba("+ai[0]+","+ai[1]+","+ai[2]+","+this.fillAlpha+")"}if(L.isFunction(this.renderer)){this.renderer=new this.renderer()}this.renderer.init.call(this,this.rendererOptions,am);this.markerRenderer=new this.markerRenderer();if(!this.markerOptions.color){this.markerOptions.color=this.color}if(this.markerOptions.show==null){this.markerOptions.show=this.showMarker}this.showMarker=this.markerOptions.show;this.markerRenderer.init(this.markerOptions)};S.prototype.draw=function(an,ak,am){var ai=(ak==u)?{}:ak;an=(an==u)?this.canvas._ctx:an;var ah,al,aj;for(ah=0;ah<L.jqplot.preDrawSeriesHooks.length;ah++){L.jqplot.preDrawSeriesHooks[ah].call(this,an,ai)}if(this.show){this.renderer.setGridData.call(this,am);if(!ai.preventJqPlotSeriesDrawTrigger){L(an.canvas).trigger("jqplotSeriesDraw",[this.data,this.gridData])}al=[];if(ai.data){al=ai.data}else{if(!this._stack){al=this.data}else{al=this._plotData}}aj=ai.gridData||this.renderer.makeGridData.call(this,al,am);if(this._type==="line"&&this.renderer.smooth&&this.renderer._smoothedData.length){aj=this.renderer._smoothedData}this.renderer.draw.call(this,an,aj,ai,am)}for(ah=0;ah<L.jqplot.postDrawSeriesHooks.length;ah++){L.jqplot.postDrawSeriesHooks[ah].call(this,an,ai,am)}an=ak=am=ah=al=aj=null};S.prototype.drawShadow=function(an,ak,am){var ai=(ak==u)?{}:ak;an=(an==u)?this.shadowCanvas._ctx:an;var ah,al,aj;for(ah=0;ah<L.jqplot.preDrawSeriesShadowHooks.length;ah++){L.jqplot.preDrawSeriesShadowHooks[ah].call(this,an,ai)}if(this.shadow){this.renderer.setGridData.call(this,am);al=[];if(ai.data){al=ai.data}else{if(!this._stack){al=this.data}else{al=this._plotData}}aj=ai.gridData||this.renderer.makeGridData.call(this,al,am);this.renderer.drawShadow.call(this,an,aj,ai,am)}for(ah=0;ah<L.jqplot.postDrawSeriesShadowHooks.length;ah++){L.jqplot.postDrawSeriesShadowHooks[ah].call(this,an,ai)}an=ak=am=ah=al=aj=null};S.prototype.toggleDisplay=function(ai,ak){var ah,aj;if(ai.data.series){ah=ai.data.series}else{ah=this}if(ai.data.speed){aj=ai.data.speed}if(aj){if(ah.canvas._elem.is(":hidden")||!ah.show){ah.show=true;ah.canvas._elem.removeClass("jqplot-series-hidden");if(ah.shadowCanvas._elem){ah.shadowCanvas._elem.fadeIn(aj)}ah.canvas._elem.fadeIn(aj,ak);ah.canvas._elem.nextAll(".jqplot-point-label.jqplot-series-"+ah.index).fadeIn(aj)}else{ah.show=false;ah.canvas._elem.addClass("jqplot-series-hidden");if(ah.shadowCanvas._elem){ah.shadowCanvas._elem.fadeOut(aj)}ah.canvas._elem.fadeOut(aj,ak);ah.canvas._elem.nextAll(".jqplot-point-label.jqplot-series-"+ah.index).fadeOut(aj)}}else{if(ah.canvas._elem.is(":hidden")||!ah.show){ah.show=true;ah.canvas._elem.removeClass("jqplot-series-hidden");if(ah.shadowCanvas._elem){ah.shadowCanvas._elem.show()}ah.canvas._elem.show(0,ak);ah.canvas._elem.nextAll(".jqplot-point-label.jqplot-series-"+ah.index).show()}else{ah.show=false;ah.canvas._elem.addClass("jqplot-series-hidden");if(ah.shadowCanvas._elem){ah.shadowCanvas._elem.hide()}ah.canvas._elem.hide(0,ak);ah.canvas._elem.nextAll(".jqplot-point-label.jqplot-series-"+ah.index).hide()}}};function M(){L.jqplot.ElemContainer.call(this);this.drawGridlines=true;this.gridLineColor="#cccccc";this.gridLineWidth=1;this.background="#fffdf6";this.borderColor="#999999";this.borderWidth=2;this.drawBorder=true;this.shadow=true;this.shadowAngle=45;this.shadowOffset=1.5;this.shadowWidth=3;this.shadowDepth=3;this.shadowColor=null;this.shadowAlpha="0.07";this._left;this._top;this._right;this._bottom;this._width;this._height;this._axes=[];this.renderer=L.jqplot.CanvasGridRenderer;this.rendererOptions={};this._offsets={top:null,bottom:null,left:null,right:null}}M.prototype=new L.jqplot.ElemContainer();M.prototype.constructor=M;M.prototype.init=function(){if(L.isFunction(this.renderer)){this.renderer=new this.renderer()}this.renderer.init.call(this,this.rendererOptions)};M.prototype.createElement=function(ah,ai){this._offsets=ah;return this.renderer.createElement.call(this,ai)};M.prototype.draw=function(){this.renderer.draw.call(this)};L.jqplot.GenericCanvas=function(){L.jqplot.ElemContainer.call(this);this._ctx};L.jqplot.GenericCanvas.prototype=new L.jqplot.ElemContainer();L.jqplot.GenericCanvas.prototype.constructor=L.jqplot.GenericCanvas;L.jqplot.GenericCanvas.prototype.createElement=function(al,aj,ai,am){this._offsets=al;var ah="jqplot";if(aj!=u){ah=aj}var ak;ak=am.canvasManager.getCanvas();if(ai!=null){this._plotDimensions=ai}ak.width=this._plotDimensions.width-this._offsets.left-this._offsets.right;ak.height=this._plotDimensions.height-this._offsets.top-this._offsets.bottom;this._elem=L(ak);this._elem.css({position:"absolute",left:this._offsets.left,top:this._offsets.top});this._elem.addClass(ah);ak=am.canvasManager.initCanvas(ak);ak=null;return this._elem};L.jqplot.GenericCanvas.prototype.setContext=function(){this._ctx=this._elem.get(0).getContext("2d");return this._ctx};L.jqplot.GenericCanvas.prototype.resetCanvas=function(){if(this._elem){if(L.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==u){window.G_vmlCanvasManager.uninitElement(this._elem.get(0))}this._elem.emptyForce()}this._ctx=null};L.jqplot.HooksManager=function(){this.hooks=[];this.args=[]};L.jqplot.HooksManager.prototype.addOnce=function(ak,ai){ai=ai||[];var al=false;for(var aj=0,ah=this.hooks.length;aj<ah;aj++){if(this.hooks[aj]==ak){al=true}}if(!al){this.hooks.push(ak);this.args.push(ai)}};L.jqplot.HooksManager.prototype.add=function(ai,ah){ah=ah||[];this.hooks.push(ai);this.args.push(ah)};L.jqplot.EventListenerManager=function(){this.hooks=[]};L.jqplot.EventListenerManager.prototype.addOnce=function(al,ak){var am=false,aj,ai;for(var ai=0,ah=this.hooks.length;ai<ah;ai++){aj=this.hooks[ai];if(aj[0]==al&&aj[1]==ak){am=true}}if(!am){this.hooks.push([al,ak])}};L.jqplot.EventListenerManager.prototype.add=function(ai,ah){this.hooks.push([ai,ah])};var U=["yMidAxis","xaxis","yaxis","x2axis","y2axis","y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis"];function R(){this.animate=false;this.animateReplot=false;this.axes={xaxis:new w("xaxis"),yaxis:new w("yaxis"),x2axis:new w("x2axis"),y2axis:new w("y2axis"),y3axis:new w("y3axis"),y4axis:new w("y4axis"),y5axis:new w("y5axis"),y6axis:new w("y6axis"),y7axis:new w("y7axis"),y8axis:new w("y8axis"),y9axis:new w("y9axis"),yMidAxis:new w("yMidAxis")};this.baseCanvas=new L.jqplot.GenericCanvas();this.captureRightClick=false;this.data=[];this.dataRenderer;this.dataRendererOptions;this.defaults={axesDefaults:{},axes:{xaxis:{},yaxis:{},x2axis:{},y2axis:{},y3axis:{},y4axis:{},y5axis:{},y6axis:{},y7axis:{},y8axis:{},y9axis:{},yMidAxis:{}},seriesDefaults:{},series:[]};this.defaultAxisStart=1;this.drawIfHidden=false;this.eventCanvas=new L.jqplot.GenericCanvas();this.fillBetween={series1:null,series2:null,color:null,baseSeries:0,fill:true};this.fontFamily;this.fontSize;this.grid=new M();this.legend=new q();this.noDataIndicator={show:false,indicator:"Loading Data...",axes:{xaxis:{min:0,max:10,tickInterval:2,show:true},yaxis:{min:0,max:12,tickInterval:3,show:true}}};this.negativeSeriesColors=L.jqplot.config.defaultNegativeColors;this.options={};this.previousSeriesStack=[];this.plugins={};this.series=[];this.seriesStack=[];this.seriesColors=L.jqplot.config.defaultColors;this.sortData=true;this.stackSeries=false;this.syncXTicks=true;this.syncYTicks=true;this.target=null;this.targetId=null;this.textColor;this.title=new y();this._drawCount=0;this._sumy=0;this._sumx=0;this._stackData=[];this._plotData=[];this._width=null;this._height=null;this._plotDimensions={height:null,width:null};this._gridPadding={top:null,right:null,bottom:null,left:null};this._defaultGridPadding={top:10,right:10,bottom:23,left:10};this._addDomReference=L.jqplot.config.addDomReference;this.preInitHooks=new L.jqplot.HooksManager();this.postInitHooks=new L.jqplot.HooksManager();this.preParseOptionsHooks=new L.jqplot.HooksManager();this.postParseOptionsHooks=new L.jqplot.HooksManager();this.preDrawHooks=new L.jqplot.HooksManager();this.postDrawHooks=new L.jqplot.HooksManager();this.preDrawSeriesHooks=new L.jqplot.HooksManager();this.postDrawSeriesHooks=new L.jqplot.HooksManager();this.preDrawLegendHooks=new L.jqplot.HooksManager();this.addLegendRowHooks=new L.jqplot.HooksManager();this.preSeriesInitHooks=new L.jqplot.HooksManager();this.postSeriesInitHooks=new L.jqplot.HooksManager();this.preParseSeriesOptionsHooks=new L.jqplot.HooksManager();this.postParseSeriesOptionsHooks=new L.jqplot.HooksManager();this.eventListenerHooks=new L.jqplot.EventListenerManager();this.preDrawSeriesShadowHooks=new L.jqplot.HooksManager();this.postDrawSeriesShadowHooks=new L.jqplot.HooksManager();this.colorGenerator=new L.jqplot.ColorGenerator();this.negativeColorGenerator=new L.jqplot.ColorGenerator();this.canvasManager=new L.jqplot.CanvasManager();this.themeEngine=new L.jqplot.ThemeEngine();var aj=0;this.init=function(av,ar,ay){ay=ay||{};for(var at=0;at<L.jqplot.preInitHooks.length;at++){L.jqplot.preInitHooks[at].call(this,av,ar,ay)}for(var at=0;at<this.preInitHooks.hooks.length;at++){this.preInitHooks.hooks[at].call(this,av,ar,ay)}this.targetId="#"+av;this.target=L("#"+av);if(this._addDomReference){this.target.data("jqplot",this)}this.target.removeClass("jqplot-error");if(!this.target.get(0)){throw new Error("No plot target specified")}if(this.target.css("position")=="static"){this.target.css("position","relative")}if(!this.target.hasClass("jqplot-target")){this.target.addClass("jqplot-target")}if(!this.target.height()){var au;if(ay&&ay.height){au=parseInt(ay.height,10)}else{if(this.target.attr("data-height")){au=parseInt(this.target.attr("data-height"),10)}else{au=parseInt(L.jqplot.config.defaultHeight,10)}}this._height=au;this.target.css("height",au+"px")}else{this._height=au=this.target.height()}if(!this.target.width()){var aw;if(ay&&ay.width){aw=parseInt(ay.width,10)}else{if(this.target.attr("data-width")){aw=parseInt(this.target.attr("data-width"),10)}else{aw=parseInt(L.jqplot.config.defaultWidth,10)}}this._width=aw;this.target.css("width",aw+"px")}else{this._width=aw=this.target.width()}for(var at=0,ap=U.length;at<ap;at++){this.axes[U[at]]=new w(U[at])}this._plotDimensions.height=this._height;this._plotDimensions.width=this._width;this.grid._plotDimensions=this._plotDimensions;this.title._plotDimensions=this._plotDimensions;this.baseCanvas._plotDimensions=this._plotDimensions;this.eventCanvas._plotDimensions=this._plotDimensions;this.legend._plotDimensions=this._plotDimensions;if(this._height<=0||this._width<=0||!this._height||!this._width){throw new Error("Canvas dimension not set")}if(ay.dataRenderer&&L.isFunction(ay.dataRenderer)){if(ay.dataRendererOptions){this.dataRendererOptions=ay.dataRendererOptions}this.dataRenderer=ay.dataRenderer;ar=this.dataRenderer(ar,this,this.dataRendererOptions)}if(ay.noDataIndicator&&L.isPlainObject(ay.noDataIndicator)){L.extend(true,this.noDataIndicator,ay.noDataIndicator)}if(ar==null||L.isArray(ar)==false||ar.length==0||L.isArray(ar[0])==false||ar[0].length==0){if(this.noDataIndicator.show==false){throw new Error("No data specified")}else{for(var al in this.noDataIndicator.axes){for(var an in this.noDataIndicator.axes[al]){this.axes[al][an]=this.noDataIndicator.axes[al][an]}}this.postDrawHooks.add(function(){var aD=this.eventCanvas.getHeight();var aA=this.eventCanvas.getWidth();var az=L('<div class="jqplot-noData-container" style="position:absolute;"></div>');this.target.append(az);az.height(aD);az.width(aA);az.css("top",this.eventCanvas._offsets.top);az.css("left",this.eventCanvas._offsets.left);var aC=L('<div class="jqplot-noData-contents" style="text-align:center; position:relative; margin-left:auto; margin-right:auto;"></div>');az.append(aC);aC.html(this.noDataIndicator.indicator);var aB=aC.height();var ax=aC.width();aC.height(aB);aC.width(ax);aC.css("top",(aD-aB)/2+"px")})}}this.data=L.extend(true,[],ar);this.parseOptions(ay);if(this.textColor){this.target.css("color",this.textColor)}if(this.fontFamily){this.target.css("font-family",this.fontFamily)}if(this.fontSize){this.target.css("font-size",this.fontSize)}this.title.init();this.legend.init();this._sumy=0;this._sumx=0;this.computePlotData();for(var at=0;at<this.series.length;at++){this.seriesStack.push(at);this.previousSeriesStack.push(at);this.series[at].shadowCanvas._plotDimensions=this._plotDimensions;this.series[at].canvas._plotDimensions=this._plotDimensions;for(var aq=0;aq<L.jqplot.preSeriesInitHooks.length;aq++){L.jqplot.preSeriesInitHooks[aq].call(this.series[at],av,this.data,this.options.seriesDefaults,this.options.series[at],this)}for(var aq=0;aq<this.preSeriesInitHooks.hooks.length;aq++){this.preSeriesInitHooks.hooks[aq].call(this.series[at],av,this.data,this.options.seriesDefaults,this.options.series[at],this)}this.series[at]._plotDimensions=this._plotDimensions;this.series[at].init(at,this.grid.borderWidth,this);for(var aq=0;aq<L.jqplot.postSeriesInitHooks.length;aq++){L.jqplot.postSeriesInitHooks[aq].call(this.series[at],av,this.data,this.options.seriesDefaults,this.options.series[at],this)}for(var aq=0;aq<this.postSeriesInitHooks.hooks.length;aq++){this.postSeriesInitHooks.hooks[aq].call(this.series[at],av,this.data,this.options.seriesDefaults,this.options.series[at],this)}this._sumy+=this.series[at]._sumy;this._sumx+=this.series[at]._sumx}var am,ao;for(var at=0,ap=U.length;at<ap;at++){am=U[at];ao=this.axes[am];ao._plotDimensions=this._plotDimensions;ao.init();if(this.axes[am].borderColor==null){if(am.charAt(0)!=="x"&&ao.useSeriesColor===true&&ao.show){ao.borderColor=ao._series[0].color}else{ao.borderColor=this.grid.borderColor}}}if(this.sortData){ah(this.series)}this.grid.init();this.grid._axes=this.axes;this.legend._series=this.series;for(var at=0;at<L.jqplot.postInitHooks.length;at++){L.jqplot.postInitHooks[at].call(this,av,this.data,ay)}for(var at=0;at<this.postInitHooks.hooks.length;at++){this.postInitHooks.hooks[at].call(this,av,this.data,ay)}};this.resetAxesScale=function(aq,am){var ao=am||{};var ap=aq||this.axes;if(ap===true){ap=this.axes}if(L.isArray(ap)){for(var an=0;an<ap.length;an++){this.axes[ap[an]].resetScale(ao[ap[an]])}}else{if(typeof(ap)==="object"){for(var al in ap){this.axes[al].resetScale(ao[al])}}}};this.reInitialize=function(au,al){var ay=L.extend(true,{},this.options,al);var aw=this.targetId.substr(1);var ar=(au==null)?this.data:au;for(var av=0;av<L.jqplot.preInitHooks.length;av++){L.jqplot.preInitHooks[av].call(this,aw,ar,ay)}for(var av=0;av<this.preInitHooks.hooks.length;av++){this.preInitHooks.hooks[av].call(this,aw,ar,ay)}this._height=this.target.height();this._width=this.target.width();if(this._height<=0||this._width<=0||!this._height||!this._width){throw new Error("Target dimension not set")}this._plotDimensions.height=this._height;this._plotDimensions.width=this._width;this.grid._plotDimensions=this._plotDimensions;this.title._plotDimensions=this._plotDimensions;this.baseCanvas._plotDimensions=this._plotDimensions;this.eventCanvas._plotDimensions=this._plotDimensions;this.legend._plotDimensions=this._plotDimensions;var am,ax,at,ao;for(var av=0,aq=U.length;av<aq;av++){am=U[av];ao=this.axes[am];ax=ao._ticks;for(var at=0,ap=ax.length;at<ap;at++){var an=ax[at]._elem;if(an){if(L.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==u){window.G_vmlCanvasManager.uninitElement(an.get(0))}an.emptyForce();an=null;ax._elem=null}}ax=null;delete ao.ticks;delete ao._ticks;this.axes[am]=new w(am);this.axes[am]._plotWidth=this._width;this.axes[am]._plotHeight=this._height}if(au){if(ay.dataRenderer&&L.isFunction(ay.dataRenderer)){if(ay.dataRendererOptions){this.dataRendererOptions=ay.dataRendererOptions}this.dataRenderer=ay.dataRenderer;au=this.dataRenderer(au,this,this.dataRendererOptions)}this.data=L.extend(true,[],au)}if(al){this.parseOptions(ay)}this.title._plotWidth=this._width;if(this.textColor){this.target.css("color",this.textColor)}if(this.fontFamily){this.target.css("font-family",this.fontFamily)}if(this.fontSize){this.target.css("font-size",this.fontSize)}this.title.init();this.legend.init();this._sumy=0;this._sumx=0;this.seriesStack=[];this.previousSeriesStack=[];this.computePlotData();for(var av=0,aq=this.series.length;av<aq;av++){this.seriesStack.push(av);this.previousSeriesStack.push(av);this.series[av].shadowCanvas._plotDimensions=this._plotDimensions;this.series[av].canvas._plotDimensions=this._plotDimensions;for(var at=0;at<L.jqplot.preSeriesInitHooks.length;at++){L.jqplot.preSeriesInitHooks[at].call(this.series[av],aw,this.data,this.options.seriesDefaults,this.options.series[av],this)}for(var at=0;at<this.preSeriesInitHooks.hooks.length;at++){this.preSeriesInitHooks.hooks[at].call(this.series[av],aw,this.data,this.options.seriesDefaults,this.options.series[av],this)}this.series[av]._plotDimensions=this._plotDimensions;this.series[av].init(av,this.grid.borderWidth,this);for(var at=0;at<L.jqplot.postSeriesInitHooks.length;at++){L.jqplot.postSeriesInitHooks[at].call(this.series[av],aw,this.data,this.options.seriesDefaults,this.options.series[av],this)}for(var at=0;at<this.postSeriesInitHooks.hooks.length;at++){this.postSeriesInitHooks.hooks[at].call(this.series[av],aw,this.data,this.options.seriesDefaults,this.options.series[av],this)}this._sumy+=this.series[av]._sumy;this._sumx+=this.series[av]._sumx}for(var av=0,aq=U.length;av<aq;av++){am=U[av];ao=this.axes[am];ao._plotDimensions=this._plotDimensions;ao.init();if(ao.borderColor==null){if(am.charAt(0)!=="x"&&ao.useSeriesColor===true&&ao.show){ao.borderColor=ao._series[0].color}else{ao.borderColor=this.grid.borderColor}}}if(this.sortData){ah(this.series)}this.grid.init();this.grid._axes=this.axes;this.legend._series=this.series;for(var av=0,aq=L.jqplot.postInitHooks.length;av<aq;av++){L.jqplot.postInitHooks[av].call(this,aw,this.data,ay)}for(var av=0,aq=this.postInitHooks.hooks.length;av<aq;av++){this.postInitHooks.hooks[av].call(this,aw,this.data,ay)}};this.quickInit=function(){this._height=this.target.height();this._width=this.target.width();if(this._height<=0||this._width<=0||!this._height||!this._width){throw new Error("Target dimension not set")}this._plotDimensions.height=this._height;this._plotDimensions.width=this._width;this.grid._plotDimensions=this._plotDimensions;this.title._plotDimensions=this._plotDimensions;this.baseCanvas._plotDimensions=this._plotDimensions;this.eventCanvas._plotDimensions=this._plotDimensions;this.legend._plotDimensions=this._plotDimensions;for(var aq in this.axes){this.axes[aq]._plotWidth=this._width;this.axes[aq]._plotHeight=this._height}this.title._plotWidth=this._width;if(this.textColor){this.target.css("color",this.textColor)}if(this.fontFamily){this.target.css("font-family",this.fontFamily)}if(this.fontSize){this.target.css("font-size",this.fontSize)}this._sumy=0;this._sumx=0;this.computePlotData();for(var ao=0;ao<this.series.length;ao++){if(this.series[ao]._type==="line"&&this.series[ao].renderer.bands.show){this.series[ao].renderer.initBands.call(this.series[ao],this.series[ao].renderer.options,this)}this.series[ao]._plotDimensions=this._plotDimensions;this.series[ao].canvas._plotDimensions=this._plotDimensions;this._sumy+=this.series[ao]._sumy;this._sumx+=this.series[ao]._sumx}var am;for(var al=0;al<12;al++){am=U[al];var an=this.axes[am]._ticks;for(var ao=0;ao<an.length;ao++){var ap=an[ao]._elem;if(ap){if(L.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==u){window.G_vmlCanvasManager.uninitElement(ap.get(0))}ap.emptyForce();ap=null;an._elem=null}}an=null;this.axes[am]._plotDimensions=this._plotDimensions;this.axes[am]._ticks=[]}if(this.sortData){ah(this.series)}this.grid._axes=this.axes;this.legend._series=this.series};function ah(ap){var au,av,aw,al,at;for(var aq=0;aq<ap.length;aq++){var am;var ar=[ap[aq].data,ap[aq]._stackData,ap[aq]._plotData,ap[aq]._prevPlotData];for(var an=0;an<4;an++){am=true;au=ar[an];if(ap[aq]._stackAxis=="x"){for(var ao=0;ao<au.length;ao++){if(typeof(au[ao][1])!="number"){am=false;break}}if(am){au.sort(function(ay,ax){return ay[1]-ax[1]})}}else{for(var ao=0;ao<au.length;ao++){if(typeof(au[ao][0])!="number"){am=false;break}}if(am){au.sort(function(ay,ax){return ay[0]-ax[0]})}}}}}this.computePlotData=function(){this._plotData=[];this._stackData=[];var at,au,ao;for(au=0,ao=this.series.length;au<ao;au++){at=this.series[au];this._plotData.push([]);this._stackData.push([]);var am=at.data;this._plotData[au]=L.extend(true,[],am);this._stackData[au]=L.extend(true,[],am);at._plotData=this._plotData[au];at._stackData=this._stackData[au];var ax={x:[],y:[]};if(this.stackSeries&&!at.disableStack){at._stack=true;var av=(at._stackAxis==="x")?0:1;for(var ap=0,al=am.length;ap<al;ap++){var aw=am[ap][av];if(aw==null){aw=0}this._plotData[au][ap][av]=aw;this._stackData[au][ap][av]=aw;if(au>0){for(var aq=au;aq--;){var an=this._plotData[aq][ap][av];if(aw*an>=0){this._plotData[au][ap][av]+=an;this._stackData[au][ap][av]+=an;break}}}}}else{for(var ar=0;ar<at.data.length;ar++){ax.x.push(at.data[ar][0]);ax.y.push(at.data[ar][1])}this._stackData.push(at.data);this.series[au]._stackData=at.data;this._plotData.push(at.data);at._plotData=at.data;at._plotValues=ax}if(au>0){at._prevPlotData=this.series[au-1]._plotData}at._sumy=0;at._sumx=0;for(ar=at.data.length-1;ar>-1;ar--){at._sumy+=at.data[ar][1];at._sumx+=at.data[ar][0]}}};this.populatePlotData=function(au,av){this._plotData=[];this._stackData=[];au._stackData=[];au._plotData=[];var ay={x:[],y:[]};if(this.stackSeries&&!au.disableStack){au._stack=true;var ax=(au._stackAxis==="x")?0:1;var az=L.extend(true,[],au.data);var aA=L.extend(true,[],au.data);var an,am,ao,aw,al;for(var ar=0;ar<av;ar++){var ap=this.series[ar].data;for(var aq=0;aq<ap.length;aq++){ao=ap[aq];an=(ao[0]!=null)?ao[0]:0;am=(ao[1]!=null)?ao[1]:0;az[aq][0]+=an;az[aq][1]+=am;aw=(ax)?am:an;if(au.data[aq][ax]*aw>=0){aA[aq][ax]+=aw}}}for(var at=0;at<aA.length;at++){ay.x.push(aA[at][0]);ay.y.push(aA[at][1])}this._plotData.push(aA);this._stackData.push(az);au._stackData=az;au._plotData=aA;au._plotValues=ay}else{for(var at=0;at<au.data.length;at++){ay.x.push(au.data[at][0]);ay.y.push(au.data[at][1])}this._stackData.push(au.data);this.series[av]._stackData=au.data;this._plotData.push(au.data);au._plotData=au.data;au._plotValues=ay}if(av>0){au._prevPlotData=this.series[av-1]._plotData}au._sumy=0;au._sumx=0;for(at=au.data.length-1;at>-1;at--){au._sumy+=au.data[at][1];au._sumx+=au.data[at][0]}};this.getNextSeriesColor=(function(am){var al=0;var an=am.seriesColors;return function(){if(al<an.length){return an[al++]}else{al=0;return an[al++]}}})(this);this.parseOptions=function(ay){for(var at=0;at<this.preParseOptionsHooks.hooks.length;at++){this.preParseOptionsHooks.hooks[at].call(this,ay)}for(var at=0;at<L.jqplot.preParseOptionsHooks.length;at++){L.jqplot.preParseOptionsHooks[at].call(this,ay)}this.options=L.extend(true,{},this.defaults,ay);var am=this.options;this.animate=am.animate;this.animateReplot=am.animateReplot;this.stackSeries=am.stackSeries;if(L.isPlainObject(am.fillBetween)){var ax=["series1","series2","color","baseSeries","fill"],au;for(var at=0,aq=ax.length;at<aq;at++){au=ax[at];if(am.fillBetween[au]!=null){this.fillBetween[au]=am.fillBetween[au]}}}if(am.seriesColors){this.seriesColors=am.seriesColors}if(am.negativeSeriesColors){this.negativeSeriesColors=am.negativeSeriesColors}if(am.captureRightClick){this.captureRightClick=am.captureRightClick}this.defaultAxisStart=(ay&&ay.defaultAxisStart!=null)?ay.defaultAxisStart:this.defaultAxisStart;this.colorGenerator.setColors(this.seriesColors);this.negativeColorGenerator.setColors(this.negativeSeriesColors);L.extend(true,this._gridPadding,am.gridPadding);this.sortData=(am.sortData!=null)?am.sortData:this.sortData;for(var at=0;at<12;at++){var an=U[at];var ap=this.axes[an];ap._options=L.extend(true,{},am.axesDefaults,am.axes[an]);L.extend(true,ap,am.axesDefaults,am.axes[an]);ap._plotWidth=this._width;ap._plotHeight=this._height}var aw=function(aD,aB,aE){var aA=[];var aC,az;aB=aB||"vertical";if(!L.isArray(aD[0])){for(aC=0,az=aD.length;aC<az;aC++){if(aB=="vertical"){aA.push([aE+aC,aD[aC]])}else{aA.push([aD[aC],aE+aC])}}}else{L.extend(true,aA,aD)}return aA};var av=0;this.series=[];for(var at=0;at<this.data.length;at++){var al=L.extend(true,{index:at},{seriesColors:this.seriesColors,negativeSeriesColors:this.negativeSeriesColors},this.options.seriesDefaults,this.options.series[at],{rendererOptions:{animation:{show:this.animate}}});var ax=new S(al);for(var ar=0;ar<L.jqplot.preParseSeriesOptionsHooks.length;ar++){L.jqplot.preParseSeriesOptionsHooks[ar].call(ax,this.options.seriesDefaults,this.options.series[at])}for(var ar=0;ar<this.preParseSeriesOptionsHooks.hooks.length;ar++){this.preParseSeriesOptionsHooks.hooks[ar].call(ax,this.options.seriesDefaults,this.options.series[at])}L.extend(true,ax,al);var ao="vertical";if(ax.renderer===L.jqplot.BarRenderer&&ax.rendererOptions&&ax.rendererOptions.barDirection=="horizontal"){ao="horizontal";ax._stackAxis="x";ax._primaryAxis="_yaxis"}ax.data=aw(this.data[at],ao,this.defaultAxisStart);switch(ax.xaxis){case"xaxis":ax._xaxis=this.axes.xaxis;break;case"x2axis":ax._xaxis=this.axes.x2axis;break;default:break}ax._yaxis=this.axes[ax.yaxis];ax._xaxis._series.push(ax);ax._yaxis._series.push(ax);if(ax.show){ax._xaxis.show=true;ax._yaxis.show=true}else{if(ax._xaxis.scaleToHiddenSeries){ax._xaxis.show=true}if(ax._yaxis.scaleToHiddenSeries){ax._yaxis.show=true}}if(!ax.label){ax.label="Series "+(at+1).toString()}this.series.push(ax);for(var ar=0;ar<L.jqplot.postParseSeriesOptionsHooks.length;ar++){L.jqplot.postParseSeriesOptionsHooks[ar].call(this.series[at],this.options.seriesDefaults,this.options.series[at])}for(var ar=0;ar<this.postParseSeriesOptionsHooks.hooks.length;ar++){this.postParseSeriesOptionsHooks.hooks[ar].call(this.series[at],this.options.seriesDefaults,this.options.series[at])}}L.extend(true,this.grid,this.options.grid);for(var at=0,aq=U.length;at<aq;at++){var an=U[at];var ap=this.axes[an];if(ap.borderWidth==null){ap.borderWidth=this.grid.borderWidth}}if(typeof this.options.title=="string"){this.title.text=this.options.title}else{if(typeof this.options.title=="object"){L.extend(true,this.title,this.options.title)}}this.title._plotWidth=this._width;this.legend.setOptions(this.options.legend);for(var at=0;at<L.jqplot.postParseOptionsHooks.length;at++){L.jqplot.postParseOptionsHooks[at].call(this,ay)}for(var at=0;at<this.postParseOptionsHooks.hooks.length;at++){this.postParseOptionsHooks.hooks[at].call(this,ay)}};this.destroy=function(){this.canvasManager.freeAllCanvases();if(this.eventCanvas&&this.eventCanvas._elem){this.eventCanvas._elem.unbind()}this.target.empty();this.target[0].innerHTML=""};this.replot=function(am){var an=am||{};var ap=an.data||null;var al=(an.clear===false)?false:true;var ao=an.resetAxes||false;delete an.data;delete an.clear;delete an.resetAxes;this.target.trigger("jqplotPreReplot");if(al){this.destroy()}if(ap||!L.isEmptyObject(an)){this.reInitialize(ap,an)}else{this.quickInit()}if(ao){this.resetAxesScale(ao,an.axes)}this.draw();this.target.trigger("jqplotPostReplot")};this.redraw=function(al){al=(al!=null)?al:true;this.target.trigger("jqplotPreRedraw");if(al){this.canvasManager.freeAllCanvases();this.eventCanvas._elem.unbind();this.target.empty()}for(var an in this.axes){this.axes[an]._ticks=[]}this.computePlotData();this._sumy=0;this._sumx=0;for(var am=0,ao=this.series.length;am<ao;am++){this._sumy+=this.series[am]._sumy;this._sumx+=this.series[am]._sumx}this.draw();this.target.trigger("jqplotPostRedraw")};this.draw=function(){if(this.drawIfHidden||this.target.is(":visible")){this.target.trigger("jqplotPreDraw");var aH,aF,aE,ao;for(aH=0,aE=L.jqplot.preDrawHooks.length;aH<aE;aH++){L.jqplot.preDrawHooks[aH].call(this)}for(aH=0,aE=this.preDrawHooks.hooks.length;aH<aE;aH++){this.preDrawHooks.hooks[aH].apply(this,this.preDrawSeriesHooks.args[aH])}this.target.append(this.baseCanvas.createElement({left:0,right:0,top:0,bottom:0},"jqplot-base-canvas",null,this));this.baseCanvas.setContext();this.target.append(this.title.draw());this.title.pack({top:0,left:0});var aL=this.legend.draw({},this);var al={top:0,left:0,bottom:0,right:0};if(this.legend.placement=="outsideGrid"){this.target.append(aL);switch(this.legend.location){case"n":al.top+=this.legend.getHeight();break;case"s":al.bottom+=this.legend.getHeight();break;case"ne":case"e":case"se":al.right+=this.legend.getWidth();break;case"nw":case"w":case"sw":al.left+=this.legend.getWidth();break;default:al.right+=this.legend.getWidth();break}aL=aL.detach()}var ar=this.axes;var aM;for(aH=0;aH<12;aH++){aM=U[aH];this.target.append(ar[aM].draw(this.baseCanvas._ctx,this));ar[aM].set()}if(ar.yaxis.show){al.left+=ar.yaxis.getWidth()}var aG=["y2axis","y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis"];var az=[0,0,0,0,0,0,0,0];var aC=0;var aB;for(aB=0;aB<8;aB++){if(ar[aG[aB]].show){aC+=ar[aG[aB]].getWidth();az[aB]=aC}}al.right+=aC;if(ar.x2axis.show){al.top+=ar.x2axis.getHeight()}if(this.title.show){al.top+=this.title.getHeight()}if(ar.xaxis.show){al.bottom+=ar.xaxis.getHeight()}if(this.options.gridDimensions&&L.isPlainObject(this.options.gridDimensions)){var at=parseInt(this.options.gridDimensions.width,10)||0;var aI=parseInt(this.options.gridDimensions.height,10)||0;var an=(this._width-al.left-al.right-at)/2;var aK=(this._height-al.top-al.bottom-aI)/2;if(aK>=0&&an>=0){al.top+=aK;al.bottom+=aK;al.left+=an;al.right+=an}}var am=["top","bottom","left","right"];for(var aB in am){if(this._gridPadding[am[aB]]==null&&al[am[aB]]>0){this._gridPadding[am[aB]]=al[am[aB]]}else{if(this._gridPadding[am[aB]]==null){this._gridPadding[am[aB]]=this._defaultGridPadding[am[aB]]}}}var aA=this._gridPadding;if(this.legend.placement==="outsideGrid"){aA={top:this.title.getHeight(),left:0,right:0,bottom:0};if(this.legend.location==="s"){aA.left=this._gridPadding.left;aA.right=this._gridPadding.right}}ar.xaxis.pack({position:"absolute",bottom:this._gridPadding.bottom-ar.xaxis.getHeight(),left:0,width:this._width},{min:this._gridPadding.left,max:this._width-this._gridPadding.right});ar.yaxis.pack({position:"absolute",top:0,left:this._gridPadding.left-ar.yaxis.getWidth(),height:this._height},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top});ar.x2axis.pack({position:"absolute",top:this._gridPadding.top-ar.x2axis.getHeight(),left:0,width:this._width},{min:this._gridPadding.left,max:this._width-this._gridPadding.right});for(aH=8;aH>0;aH--){ar[aG[aH-1]].pack({position:"absolute",top:0,right:this._gridPadding.right-az[aH-1]},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top})}var au=(this._width-this._gridPadding.left-this._gridPadding.right)/2+this._gridPadding.left-ar.yMidAxis.getWidth()/2;ar.yMidAxis.pack({position:"absolute",top:0,left:au,zIndex:9,textAlign:"center"},{min:this._height-this._gridPadding.bottom,max:this._gridPadding.top});this.target.append(this.grid.createElement(this._gridPadding,this));this.grid.draw();var aq=this.series;var aJ=aq.length;for(aH=0,aE=aJ;aH<aE;aH++){aF=this.seriesStack[aH];this.target.append(aq[aF].shadowCanvas.createElement(this._gridPadding,"jqplot-series-shadowCanvas",null,this));aq[aF].shadowCanvas.setContext();aq[aF].shadowCanvas._elem.data("seriesIndex",aF)}for(aH=0,aE=aJ;aH<aE;aH++){aF=this.seriesStack[aH];this.target.append(aq[aF].canvas.createElement(this._gridPadding,"jqplot-series-canvas",null,this));aq[aF].canvas.setContext();aq[aF].canvas._elem.data("seriesIndex",aF)}this.target.append(this.eventCanvas.createElement(this._gridPadding,"jqplot-event-canvas",null,this));this.eventCanvas.setContext();this.eventCanvas._ctx.fillStyle="rgba(0,0,0,0)";this.eventCanvas._ctx.fillRect(0,0,this.eventCanvas._ctx.canvas.width,this.eventCanvas._ctx.canvas.height);this.bindCustomEvents();if(this.legend.preDraw){this.eventCanvas._elem.before(aL);this.legend.pack(aA);if(this.legend._elem){this.drawSeries({legendInfo:{location:this.legend.location,placement:this.legend.placement,width:this.legend.getWidth(),height:this.legend.getHeight(),xoffset:this.legend.xoffset,yoffset:this.legend.yoffset}})}else{this.drawSeries()}}else{this.drawSeries();if(aJ){L(aq[aJ-1].canvas._elem).after(aL)}this.legend.pack(aA)}for(var aH=0,aE=L.jqplot.eventListenerHooks.length;aH<aE;aH++){this.eventCanvas._elem.bind(L.jqplot.eventListenerHooks[aH][0],{plot:this},L.jqplot.eventListenerHooks[aH][1])}for(var aH=0,aE=this.eventListenerHooks.hooks.length;aH<aE;aH++){this.eventCanvas._elem.bind(this.eventListenerHooks.hooks[aH][0],{plot:this},this.eventListenerHooks.hooks[aH][1])}var ay=this.fillBetween;if(ay.fill&&ay.series1!==ay.series2&&ay.series1<aJ&&ay.series2<aJ&&aq[ay.series1]._type==="line"&&aq[ay.series2]._type==="line"){this.doFillBetweenLines()}for(var aH=0,aE=L.jqplot.postDrawHooks.length;aH<aE;aH++){L.jqplot.postDrawHooks[aH].call(this)}for(var aH=0,aE=this.postDrawHooks.hooks.length;aH<aE;aH++){this.postDrawHooks.hooks[aH].apply(this,this.postDrawHooks.args[aH])}if(this.target.is(":visible")){this._drawCount+=1}var av,aw,aD,ap;for(aH=0,aE=aJ;aH<aE;aH++){av=aq[aH];aw=av.renderer;aD=".jqplot-point-label.jqplot-series-"+aH;if(aw.animation&&aw.animation._supported&&aw.animation.show&&(this._drawCount<2||this.animateReplot)){ap=this.target.find(aD);ap.stop(true,true).hide();av.canvas._elem.stop(true,true).hide();av.shadowCanvas._elem.stop(true,true).hide();av.canvas._elem.jqplotEffect("blind",{mode:"show",direction:aw.animation.direction},aw.animation.speed);av.shadowCanvas._elem.jqplotEffect("blind",{mode:"show",direction:aw.animation.direction},aw.animation.speed);ap.fadeIn(aw.animation.speed*0.8)}}ap=null;this.target.trigger("jqplotPostDraw",[this])}};R.prototype.doFillBetweenLines=function(){var an=this.fillBetween;var ax=an.series1;var av=an.series2;var aw=(ax<av)?ax:av;var au=(av>ax)?av:ax;var ar=this.series[aw];var aq=this.series[au];if(aq.renderer.smooth){var ap=aq.renderer._smoothedData.slice(0).reverse()}else{var ap=aq.gridData.slice(0).reverse()}if(ar.renderer.smooth){var at=ar.renderer._smoothedData.concat(ap)}else{var at=ar.gridData.concat(ap)}var ao=(an.color!==null)?an.color:this.series[ax].fillColor;var ay=(an.baseSeries!==null)?an.baseSeries:aw;var am=this.series[ay].renderer.shapeRenderer;var al={fillStyle:ao,fill:true,closePath:true};am.draw(ar.shadowCanvas._ctx,at,al)};this.bindCustomEvents=function(){this.eventCanvas._elem.bind("click",{plot:this},this.onClick);this.eventCanvas._elem.bind("dblclick",{plot:this},this.onDblClick);this.eventCanvas._elem.bind("mousedown",{plot:this},this.onMouseDown);this.eventCanvas._elem.bind("mousemove",{plot:this},this.onMouseMove);this.eventCanvas._elem.bind("mouseenter",{plot:this},this.onMouseEnter);this.eventCanvas._elem.bind("mouseleave",{plot:this},this.onMouseLeave);if(this.captureRightClick){this.eventCanvas._elem.bind("mouseup",{plot:this},this.onRightClick);this.eventCanvas._elem.get(0).oncontextmenu=function(){return false}}else{this.eventCanvas._elem.bind("mouseup",{plot:this},this.onMouseUp)}};function ai(av){var au=av.data.plot;var ap=au.eventCanvas._elem.offset();var at={x:av.pageX-ap.left,y:av.pageY-ap.top};var aq={xaxis:null,yaxis:null,x2axis:null,y2axis:null,y3axis:null,y4axis:null,y5axis:null,y6axis:null,y7axis:null,y8axis:null,y9axis:null,yMidAxis:null};var ar=["xaxis","yaxis","x2axis","y2axis","y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis","yMidAxis"];var al=au.axes;var am,ao;for(am=11;am>0;am--){ao=ar[am-1];if(al[ao].show){aq[ao]=al[ao].series_p2u(at[ao.charAt(0)])}}return{offsets:ap,gridPos:at,dataPos:aq}}function ak(al,am){var aq=am.series;var aW,aU,aT,aO,aP,aJ,aI,aw,au,az,aA,aK;var aS,aX,aQ,ar,aH,aM,aV;var an,aN;for(aT=am.seriesStack.length-1;aT>=0;aT--){aW=am.seriesStack[aT];aO=aq[aW];aV=aO._highlightThreshold;switch(aO.renderer.constructor){case L.jqplot.BarRenderer:aJ=al.x;aI=al.y;for(aU=0;aU<aO._barPoints.length;aU++){aH=aO._barPoints[aU];aQ=aO.gridData[aU];if(aJ>aH[0][0]&&aJ<aH[2][0]&&aI>aH[2][1]&&aI<aH[0][1]){return{seriesIndex:aO.index,pointIndex:aU,gridData:aQ,data:aO.data[aU],points:aO._barPoints[aU]}}}break;case L.jqplot.PyramidRenderer:aJ=al.x;aI=al.y;for(aU=0;aU<aO._barPoints.length;aU++){aH=aO._barPoints[aU];aQ=aO.gridData[aU];if(aJ>aH[0][0]+aV[0][0]&&aJ<aH[2][0]+aV[2][0]&&aI>aH[2][1]&&aI<aH[0][1]){return{seriesIndex:aO.index,pointIndex:aU,gridData:aQ,data:aO.data[aU],points:aO._barPoints[aU]}}}break;case L.jqplot.DonutRenderer:az=aO.startAngle/180*Math.PI;aJ=al.x-aO._center[0];aI=al.y-aO._center[1];aP=Math.sqrt(Math.pow(aJ,2)+Math.pow(aI,2));if(aJ>0&&-aI>=0){aw=2*Math.PI-Math.atan(-aI/aJ)}else{if(aJ>0&&-aI<0){aw=-Math.atan(-aI/aJ)}else{if(aJ<0){aw=Math.PI-Math.atan(-aI/aJ)}else{if(aJ==0&&-aI>0){aw=3*Math.PI/2}else{if(aJ==0&&-aI<0){aw=Math.PI/2}else{if(aJ==0&&aI==0){aw=0}}}}}}if(az){aw-=az;if(aw<0){aw+=2*Math.PI}else{if(aw>2*Math.PI){aw-=2*Math.PI}}}au=aO.sliceMargin/180*Math.PI;if(aP<aO._radius&&aP>aO._innerRadius){for(aU=0;aU<aO.gridData.length;aU++){aA=(aU>0)?aO.gridData[aU-1][1]+au:au;aK=aO.gridData[aU][1];if(aw>aA&&aw<aK){return{seriesIndex:aO.index,pointIndex:aU,gridData:[al.x,al.y],data:aO.data[aU]}}}}break;case L.jqplot.PieRenderer:az=aO.startAngle/180*Math.PI;aJ=al.x-aO._center[0];aI=al.y-aO._center[1];aP=Math.sqrt(Math.pow(aJ,2)+Math.pow(aI,2));if(aJ>0&&-aI>=0){aw=2*Math.PI-Math.atan(-aI/aJ)}else{if(aJ>0&&-aI<0){aw=-Math.atan(-aI/aJ)}else{if(aJ<0){aw=Math.PI-Math.atan(-aI/aJ)}else{if(aJ==0&&-aI>0){aw=3*Math.PI/2}else{if(aJ==0&&-aI<0){aw=Math.PI/2}else{if(aJ==0&&aI==0){aw=0}}}}}}if(az){aw-=az;if(aw<0){aw+=2*Math.PI}else{if(aw>2*Math.PI){aw-=2*Math.PI}}}au=aO.sliceMargin/180*Math.PI;if(aP<aO._radius){for(aU=0;aU<aO.gridData.length;aU++){aA=(aU>0)?aO.gridData[aU-1][1]+au:au;aK=aO.gridData[aU][1];if(aw>aA&&aw<aK){return{seriesIndex:aO.index,pointIndex:aU,gridData:[al.x,al.y],data:aO.data[aU]}}}}break;case L.jqplot.BubbleRenderer:aJ=al.x;aI=al.y;var aF=null;if(aO.show){for(var aU=0;aU<aO.gridData.length;aU++){aQ=aO.gridData[aU];aX=Math.sqrt((aJ-aQ[0])*(aJ-aQ[0])+(aI-aQ[1])*(aI-aQ[1]));if(aX<=aQ[2]&&(aX<=aS||aS==null)){aS=aX;aF={seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}if(aF!=null){return aF}}break;case L.jqplot.FunnelRenderer:aJ=al.x;aI=al.y;var aL=aO._vertices,ap=aL[0],ao=aL[aL.length-1],at,aE,ay;function aR(a0,a2,a1){var aZ=(a2[1]-a1[1])/(a2[0]-a1[0]);var aY=a2[1]-aZ*a2[0];var a3=a0+a2[1];return[(a3-aY)/aZ,a3]}at=aR(aI,ap[0],ao[3]);aE=aR(aI,ap[1],ao[2]);for(aU=0;aU<aL.length;aU++){ay=aL[aU];if(aI>=ay[0][1]&&aI<=ay[3][1]&&aJ>=at[0]&&aJ<=aE[0]){return{seriesIndex:aO.index,pointIndex:aU,gridData:null,data:aO.data[aU]}}}break;case L.jqplot.LineRenderer:aJ=al.x;aI=al.y;aP=aO.renderer;if(aO.show){if((aO.fill||(aO.renderer.bands.show&&aO.renderer.bands.fill))&&(!am.plugins.highlighter||!am.plugins.highlighter.show)){var ax=false;if(aJ>aO._boundingBox[0][0]&&aJ<aO._boundingBox[1][0]&&aI>aO._boundingBox[1][1]&&aI<aO._boundingBox[0][1]){var aD=aO._areaPoints.length;var aG;var aU=aD-1;for(var aG=0;aG<aD;aG++){var aC=[aO._areaPoints[aG][0],aO._areaPoints[aG][1]];var aB=[aO._areaPoints[aU][0],aO._areaPoints[aU][1]];if(aC[1]<aI&&aB[1]>=aI||aB[1]<aI&&aC[1]>=aI){if(aC[0]+(aI-aC[1])/(aB[1]-aC[1])*(aB[0]-aC[0])<aJ){ax=!ax}}aU=aG}}if(ax){return{seriesIndex:aW,pointIndex:null,gridData:aO.gridData,data:aO.data,points:aO._areaPoints}}break}else{aN=aO.markerRenderer.size/2+aO.neighborThreshold;an=(aN>0)?aN:0;for(var aU=0;aU<aO.gridData.length;aU++){aQ=aO.gridData[aU];if(aP.constructor==L.jqplot.OHLCRenderer){if(aP.candleStick){var av=aO._yaxis.series_u2p;if(aJ>=aQ[0]-aP._bodyWidth/2&&aJ<=aQ[0]+aP._bodyWidth/2&&aI>=av(aO.data[aU][2])&&aI<=av(aO.data[aU][3])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}else{if(!aP.hlc){var av=aO._yaxis.series_u2p;if(aJ>=aQ[0]-aP._tickLength&&aJ<=aQ[0]+aP._tickLength&&aI>=av(aO.data[aU][2])&&aI<=av(aO.data[aU][3])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}else{var av=aO._yaxis.series_u2p;if(aJ>=aQ[0]-aP._tickLength&&aJ<=aQ[0]+aP._tickLength&&aI>=av(aO.data[aU][1])&&aI<=av(aO.data[aU][2])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}}}else{if(aQ[0]!=null&&aQ[1]!=null){aX=Math.sqrt((aJ-aQ[0])*(aJ-aQ[0])+(aI-aQ[1])*(aI-aQ[1]));if(aX<=an&&(aX<=aS||aS==null)){aS=aX;return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}}}}}break;default:aJ=al.x;aI=al.y;aP=aO.renderer;if(aO.show){aN=aO.markerRenderer.size/2+aO.neighborThreshold;an=(aN>0)?aN:0;for(var aU=0;aU<aO.gridData.length;aU++){aQ=aO.gridData[aU];if(aP.constructor==L.jqplot.OHLCRenderer){if(aP.candleStick){var av=aO._yaxis.series_u2p;if(aJ>=aQ[0]-aP._bodyWidth/2&&aJ<=aQ[0]+aP._bodyWidth/2&&aI>=av(aO.data[aU][2])&&aI<=av(aO.data[aU][3])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}else{if(!aP.hlc){var av=aO._yaxis.series_u2p;if(aJ>=aQ[0]-aP._tickLength&&aJ<=aQ[0]+aP._tickLength&&aI>=av(aO.data[aU][2])&&aI<=av(aO.data[aU][3])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}else{var av=aO._yaxis.series_u2p;if(aJ>=aQ[0]-aP._tickLength&&aJ<=aQ[0]+aP._tickLength&&aI>=av(aO.data[aU][1])&&aI<=av(aO.data[aU][2])){return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}}}else{aX=Math.sqrt((aJ-aQ[0])*(aJ-aQ[0])+(aI-aQ[1])*(aI-aQ[1]));if(aX<=an&&(aX<=aS||aS==null)){aS=aX;return{seriesIndex:aW,pointIndex:aU,gridData:aQ,data:aO.data[aU]}}}}}break}}return null}this.onClick=function(an){var am=ai(an);var ap=an.data.plot;var ao=ak(am.gridPos,ap);var al=L.Event("jqplotClick");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])};this.onDblClick=function(an){var am=ai(an);var ap=an.data.plot;var ao=ak(am.gridPos,ap);var al=L.Event("jqplotDblClick");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])};this.onMouseDown=function(an){var am=ai(an);var ap=an.data.plot;var ao=ak(am.gridPos,ap);var al=L.Event("jqplotMouseDown");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])};this.onMouseUp=function(an){var am=ai(an);var al=L.Event("jqplotMouseUp");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,null,an.data.plot])};this.onRightClick=function(an){var am=ai(an);var ap=an.data.plot;var ao=ak(am.gridPos,ap);if(ap.captureRightClick){if(an.which==3){var al=L.Event("jqplotRightClick");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])}else{var al=L.Event("jqplotMouseUp");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])}}};this.onMouseMove=function(an){var am=ai(an);var ap=an.data.plot;var ao=ak(am.gridPos,ap);var al=L.Event("jqplotMouseMove");al.pageX=an.pageX;al.pageY=an.pageY;L(this).trigger(al,[am.gridPos,am.dataPos,ao,ap])};this.onMouseEnter=function(an){var am=ai(an);var ao=an.data.plot;var al=L.Event("jqplotMouseEnter");al.pageX=an.pageX;al.pageY=an.pageY;al.relatedTarget=an.relatedTarget;L(this).trigger(al,[am.gridPos,am.dataPos,null,ao])};this.onMouseLeave=function(an){var am=ai(an);var ao=an.data.plot;var al=L.Event("jqplotMouseLeave");al.pageX=an.pageX;al.pageY=an.pageY;al.relatedTarget=an.relatedTarget;L(this).trigger(al,[am.gridPos,am.dataPos,null,ao])};this.drawSeries=function(an,al){var ap,ao,am;al=(typeof(an)==="number"&&al==null)?an:al;an=(typeof(an)==="object")?an:{};if(al!=u){ao=this.series[al];am=ao.shadowCanvas._ctx;am.clearRect(0,0,am.canvas.width,am.canvas.height);ao.drawShadow(am,an,this);am=ao.canvas._ctx;am.clearRect(0,0,am.canvas.width,am.canvas.height);ao.draw(am,an,this);if(ao.renderer.constructor==L.jqplot.BezierCurveRenderer){if(al<this.series.length-1){this.drawSeries(al+1)}}}else{for(ap=0;ap<this.series.length;ap++){ao=this.series[ap];am=ao.shadowCanvas._ctx;am.clearRect(0,0,am.canvas.width,am.canvas.height);ao.drawShadow(am,an,this);am=ao.canvas._ctx;am.clearRect(0,0,am.canvas.width,am.canvas.height);ao.draw(am,an,this)}}an=al=ap=ao=am=null};this.moveSeriesToFront=function(am){am=parseInt(am,10);var ap=L.inArray(am,this.seriesStack);if(ap==-1){return}if(ap==this.seriesStack.length-1){this.previousSeriesStack=this.seriesStack.slice(0);return}var al=this.seriesStack[this.seriesStack.length-1];var ao=this.series[am].canvas._elem.detach();var an=this.series[am].shadowCanvas._elem.detach();this.series[al].shadowCanvas._elem.after(an);this.series[al].canvas._elem.after(ao);this.previousSeriesStack=this.seriesStack.slice(0);this.seriesStack.splice(ap,1);this.seriesStack.push(am)};this.moveSeriesToBack=function(am){am=parseInt(am,10);var ap=L.inArray(am,this.seriesStack);if(ap==0||ap==-1){return}var al=this.seriesStack[0];var ao=this.series[am].canvas._elem.detach();var an=this.series[am].shadowCanvas._elem.detach();this.series[al].shadowCanvas._elem.before(an);this.series[al].canvas._elem.before(ao);this.previousSeriesStack=this.seriesStack.slice(0);this.seriesStack.splice(ap,1);this.seriesStack.unshift(am)};this.restorePreviousSeriesOrder=function(){var ar,aq,ap,ao,an,al,am;if(this.seriesStack==this.previousSeriesStack){return}for(ar=1;ar<this.previousSeriesStack.length;ar++){al=this.previousSeriesStack[ar];am=this.previousSeriesStack[ar-1];ap=this.series[al].canvas._elem.detach();ao=this.series[al].shadowCanvas._elem.detach();this.series[am].shadowCanvas._elem.after(ao);this.series[am].canvas._elem.after(ap)}an=this.seriesStack.slice(0);this.seriesStack=this.previousSeriesStack.slice(0);this.previousSeriesStack=an};this.restoreOriginalSeriesOrder=function(){var ap,ao,al=[],an,am;for(ap=0;ap<this.series.length;ap++){al.push(ap)}if(this.seriesStack==al){return}this.previousSeriesStack=this.seriesStack.slice(0);this.seriesStack=al;for(ap=1;ap<this.seriesStack.length;ap++){an=this.series[ap].canvas._elem.detach();am=this.series[ap].shadowCanvas._elem.detach();this.series[ap-1].shadowCanvas._elem.after(am);this.series[ap-1].canvas._elem.after(an)}};this.activateTheme=function(al){this.themeEngine.activate(this,al)}}L.jqplot.computeHighlightColors=function(ai){var ak;if(L.isArray(ai)){ak=[];for(var am=0;am<ai.length;am++){var al=L.jqplot.getColorComponents(ai[am]);var ah=[al[0],al[1],al[2]];var an=ah[0]+ah[1]+ah[2];for(var aj=0;aj<3;aj++){ah[aj]=(an>660)?ah[aj]*0.85:0.73*ah[aj]+90;ah[aj]=parseInt(ah[aj],10);(ah[aj]>255)?255:ah[aj]}ah[3]=0.3+0.35*al[3];ak.push("rgba("+ah[0]+","+ah[1]+","+ah[2]+","+ah[3]+")")}}else{var al=L.jqplot.getColorComponents(ai);var ah=[al[0],al[1],al[2]];var an=ah[0]+ah[1]+ah[2];for(var aj=0;aj<3;aj++){ah[aj]=(an>660)?ah[aj]*0.85:0.73*ah[aj]+90;ah[aj]=parseInt(ah[aj],10);(ah[aj]>255)?255:ah[aj]}ah[3]=0.3+0.35*al[3];ak="rgba("+ah[0]+","+ah[1]+","+ah[2]+","+ah[3]+")"}return ak};L.jqplot.ColorGenerator=function(ai){ai=ai||L.jqplot.config.defaultColors;var ah=0;this.next=function(){if(ah<ai.length){return ai[ah++]}else{ah=0;return ai[ah++]}};this.previous=function(){if(ah>0){return ai[ah--]}else{ah=ai.length-1;return ai[ah]}};this.get=function(ak){var aj=ak-ai.length*Math.floor(ak/ai.length);return ai[aj]};this.setColors=function(aj){ai=aj};this.reset=function(){ah=0};this.getIndex=function(){return ah};this.setIndex=function(aj){ah=aj}};L.jqplot.hex2rgb=function(aj,ah){aj=aj.replace("#","");if(aj.length==3){aj=aj.charAt(0)+aj.charAt(0)+aj.charAt(1)+aj.charAt(1)+aj.charAt(2)+aj.charAt(2)}var ai;ai="rgba("+parseInt(aj.slice(0,2),16)+", "+parseInt(aj.slice(2,4),16)+", "+parseInt(aj.slice(4,6),16);if(ah){ai+=", "+ah}ai+=")";return ai};L.jqplot.rgb2hex=function(am){var aj=/rgba?\( *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *(?:, *[0-9.]*)?\)/;var ah=am.match(aj);var al="#";for(var ak=1;ak<4;ak++){var ai;if(ah[ak].search(/%/)!=-1){ai=parseInt(255*ah[ak]/100,10).toString(16);if(ai.length==1){ai="0"+ai}}else{ai=parseInt(ah[ak],10).toString(16);if(ai.length==1){ai="0"+ai}}al+=ai}return al};L.jqplot.normalize2rgb=function(ai,ah){if(ai.search(/^ *rgba?\(/)!=-1){return ai}else{if(ai.search(/^ *#?[0-9a-fA-F]?[0-9a-fA-F]/)!=-1){return L.jqplot.hex2rgb(ai,ah)}else{throw new Error("Invalid color spec")}}};L.jqplot.getColorComponents=function(am){am=L.jqplot.colorKeywordMap[am]||am;var ak=L.jqplot.normalize2rgb(am);var aj=/rgba?\( *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *, *([0-9]{1,3}\.?[0-9]*%?) *,? *([0-9.]* *)?\)/;var ah=ak.match(aj);var ai=[];for(var al=1;al<4;al++){if(ah[al].search(/%/)!=-1){ai[al-1]=parseInt(255*ah[al]/100,10)}else{ai[al-1]=parseInt(ah[al],10)}}ai[3]=parseFloat(ah[4])?parseFloat(ah[4]):1;return ai};L.jqplot.colorKeywordMap={aliceblue:"rgb(240, 248, 255)",antiquewhite:"rgb(250, 235, 215)",aqua:"rgb( 0, 255, 255)",aquamarine:"rgb(127, 255, 212)",azure:"rgb(240, 255, 255)",beige:"rgb(245, 245, 220)",bisque:"rgb(255, 228, 196)",black:"rgb( 0, 0, 0)",blanchedalmond:"rgb(255, 235, 205)",blue:"rgb( 0, 0, 255)",blueviolet:"rgb(138, 43, 226)",brown:"rgb(165, 42, 42)",burlywood:"rgb(222, 184, 135)",cadetblue:"rgb( 95, 158, 160)",chartreuse:"rgb(127, 255, 0)",chocolate:"rgb(210, 105, 30)",coral:"rgb(255, 127, 80)",cornflowerblue:"rgb(100, 149, 237)",cornsilk:"rgb(255, 248, 220)",crimson:"rgb(220, 20, 60)",cyan:"rgb( 0, 255, 255)",darkblue:"rgb( 0, 0, 139)",darkcyan:"rgb( 0, 139, 139)",darkgoldenrod:"rgb(184, 134, 11)",darkgray:"rgb(169, 169, 169)",darkgreen:"rgb( 0, 100, 0)",darkgrey:"rgb(169, 169, 169)",darkkhaki:"rgb(189, 183, 107)",darkmagenta:"rgb(139, 0, 139)",darkolivegreen:"rgb( 85, 107, 47)",darkorange:"rgb(255, 140, 0)",darkorchid:"rgb(153, 50, 204)",darkred:"rgb(139, 0, 0)",darksalmon:"rgb(233, 150, 122)",darkseagreen:"rgb(143, 188, 143)",darkslateblue:"rgb( 72, 61, 139)",darkslategray:"rgb( 47, 79, 79)",darkslategrey:"rgb( 47, 79, 79)",darkturquoise:"rgb( 0, 206, 209)",darkviolet:"rgb(148, 0, 211)",deeppink:"rgb(255, 20, 147)",deepskyblue:"rgb( 0, 191, 255)",dimgray:"rgb(105, 105, 105)",dimgrey:"rgb(105, 105, 105)",dodgerblue:"rgb( 30, 144, 255)",firebrick:"rgb(178, 34, 34)",floralwhite:"rgb(255, 250, 240)",forestgreen:"rgb( 34, 139, 34)",fuchsia:"rgb(255, 0, 255)",gainsboro:"rgb(220, 220, 220)",ghostwhite:"rgb(248, 248, 255)",gold:"rgb(255, 215, 0)",goldenrod:"rgb(218, 165, 32)",gray:"rgb(128, 128, 128)",grey:"rgb(128, 128, 128)",green:"rgb( 0, 128, 0)",greenyellow:"rgb(173, 255, 47)",honeydew:"rgb(240, 255, 240)",hotpink:"rgb(255, 105, 180)",indianred:"rgb(205, 92, 92)",indigo:"rgb( 75, 0, 130)",ivory:"rgb(255, 255, 240)",khaki:"rgb(240, 230, 140)",lavender:"rgb(230, 230, 250)",lavenderblush:"rgb(255, 240, 245)",lawngreen:"rgb(124, 252, 0)",lemonchiffon:"rgb(255, 250, 205)",lightblue:"rgb(173, 216, 230)",lightcoral:"rgb(240, 128, 128)",lightcyan:"rgb(224, 255, 255)",lightgoldenrodyellow:"rgb(250, 250, 210)",lightgray:"rgb(211, 211, 211)",lightgreen:"rgb(144, 238, 144)",lightgrey:"rgb(211, 211, 211)",lightpink:"rgb(255, 182, 193)",lightsalmon:"rgb(255, 160, 122)",lightseagreen:"rgb( 32, 178, 170)",lightskyblue:"rgb(135, 206, 250)",lightslategray:"rgb(119, 136, 153)",lightslategrey:"rgb(119, 136, 153)",lightsteelblue:"rgb(176, 196, 222)",lightyellow:"rgb(255, 255, 224)",lime:"rgb( 0, 255, 0)",limegreen:"rgb( 50, 205, 50)",linen:"rgb(250, 240, 230)",magenta:"rgb(255, 0, 255)",maroon:"rgb(128, 0, 0)",mediumaquamarine:"rgb(102, 205, 170)",mediumblue:"rgb( 0, 0, 205)",mediumorchid:"rgb(186, 85, 211)",mediumpurple:"rgb(147, 112, 219)",mediumseagreen:"rgb( 60, 179, 113)",mediumslateblue:"rgb(123, 104, 238)",mediumspringgreen:"rgb( 0, 250, 154)",mediumturquoise:"rgb( 72, 209, 204)",mediumvioletred:"rgb(199, 21, 133)",midnightblue:"rgb( 25, 25, 112)",mintcream:"rgb(245, 255, 250)",mistyrose:"rgb(255, 228, 225)",moccasin:"rgb(255, 228, 181)",navajowhite:"rgb(255, 222, 173)",navy:"rgb( 0, 0, 128)",oldlace:"rgb(253, 245, 230)",olive:"rgb(128, 128, 0)",olivedrab:"rgb(107, 142, 35)",orange:"rgb(255, 165, 0)",orangered:"rgb(255, 69, 0)",orchid:"rgb(218, 112, 214)",palegoldenrod:"rgb(238, 232, 170)",palegreen:"rgb(152, 251, 152)",paleturquoise:"rgb(175, 238, 238)",palevioletred:"rgb(219, 112, 147)",papayawhip:"rgb(255, 239, 213)",peachpuff:"rgb(255, 218, 185)",peru:"rgb(205, 133, 63)",pink:"rgb(255, 192, 203)",plum:"rgb(221, 160, 221)",powderblue:"rgb(176, 224, 230)",purple:"rgb(128, 0, 128)",red:"rgb(255, 0, 0)",rosybrown:"rgb(188, 143, 143)",royalblue:"rgb( 65, 105, 225)",saddlebrown:"rgb(139, 69, 19)",salmon:"rgb(250, 128, 114)",sandybrown:"rgb(244, 164, 96)",seagreen:"rgb( 46, 139, 87)",seashell:"rgb(255, 245, 238)",sienna:"rgb(160, 82, 45)",silver:"rgb(192, 192, 192)",skyblue:"rgb(135, 206, 235)",slateblue:"rgb(106, 90, 205)",slategray:"rgb(112, 128, 144)",slategrey:"rgb(112, 128, 144)",snow:"rgb(255, 250, 250)",springgreen:"rgb( 0, 255, 127)",steelblue:"rgb( 70, 130, 180)",tan:"rgb(210, 180, 140)",teal:"rgb( 0, 128, 128)",thistle:"rgb(216, 191, 216)",tomato:"rgb(255, 99, 71)",turquoise:"rgb( 64, 224, 208)",violet:"rgb(238, 130, 238)",wheat:"rgb(245, 222, 179)",white:"rgb(255, 255, 255)",whitesmoke:"rgb(245, 245, 245)",yellow:"rgb(255, 255, 0)",yellowgreen:"rgb(154, 205, 50)"};L.jqplot.AxisLabelRenderer=function(ah){L.jqplot.ElemContainer.call(this);this.axis;this.show=true;this.label="";this.fontFamily=null;this.fontSize=null;this.textColor=null;this._elem;this.escapeHTML=false;L.extend(true,this,ah)};L.jqplot.AxisLabelRenderer.prototype=new L.jqplot.ElemContainer();L.jqplot.AxisLabelRenderer.prototype.constructor=L.jqplot.AxisLabelRenderer;L.jqplot.AxisLabelRenderer.prototype.init=function(ah){L.extend(true,this,ah)};L.jqplot.AxisLabelRenderer.prototype.draw=function(ah,ai){if(this._elem){this._elem.emptyForce();this._elem=null}this._elem=L('<div style="position:absolute;" class="jqplot-'+this.axis+'-label"></div>');if(Number(this.label)){this._elem.css("white-space","nowrap")}if(!this.escapeHTML){this._elem.html(this.label)}else{this._elem.text(this.label)}if(this.fontFamily){this._elem.css("font-family",this.fontFamily)}if(this.fontSize){this._elem.css("font-size",this.fontSize)}if(this.textColor){this._elem.css("color",this.textColor)}return this._elem};L.jqplot.AxisLabelRenderer.prototype.pack=function(){};L.jqplot.AxisTickRenderer=function(ah){L.jqplot.ElemContainer.call(this);this.mark="outside";this.axis;this.showMark=true;this.showGridline=true;this.isMinorTick=false;this.size=4;this.markSize=6;this.show=true;this.showLabel=true;this.label=null;this.value=null;this._styles={};this.formatter=L.jqplot.DefaultTickFormatter;this.prefix="";this.suffix="";this.formatString="";this.fontFamily;this.fontSize;this.textColor;this.escapeHTML=false;this._elem;this._breakTick=false;L.extend(true,this,ah)};L.jqplot.AxisTickRenderer.prototype.init=function(ah){L.extend(true,this,ah)};L.jqplot.AxisTickRenderer.prototype=new L.jqplot.ElemContainer();L.jqplot.AxisTickRenderer.prototype.constructor=L.jqplot.AxisTickRenderer;L.jqplot.AxisTickRenderer.prototype.setTick=function(ah,aj,ai){this.value=ah;this.axis=aj;if(ai){this.isMinorTick=true}return this};L.jqplot.AxisTickRenderer.prototype.draw=function(){if(this.label===null){this.label=this.prefix+this.formatter(this.formatString,this.value)+this.suffix}var ai={position:"absolute"};if(Number(this.label)){ai.whitSpace="nowrap"}if(this._elem){this._elem.emptyForce();this._elem=null}this._elem=L(document.createElement("div"));this._elem.addClass("jqplot-"+this.axis+"-tick");if(!this.escapeHTML){this._elem.html(this.label)}else{this._elem.text(this.label)}this._elem.css(ai);for(var ah in this._styles){this._elem.css(ah,this._styles[ah])}if(this.fontFamily){this._elem.css("font-family",this.fontFamily)}if(this.fontSize){this._elem.css("font-size",this.fontSize)}if(this.textColor){this._elem.css("color",this.textColor)}if(this._breakTick){this._elem.addClass("jqplot-breakTick")}return this._elem};L.jqplot.DefaultTickFormatter=function(ah,ai){if(typeof ai=="number"){if(!ah){ah=L.jqplot.config.defaultTickFormatString}return L.jqplot.sprintf(ah,ai)}else{return String(ai)}};L.jqplot.PercentTickFormatter=function(ah,ai){if(typeof ai=="number"){ai=100*ai;if(!ah){ah=L.jqplot.config.defaultTickFormatString}return L.jqplot.sprintf(ah,ai)}else{return String(ai)}};L.jqplot.AxisTickRenderer.prototype.pack=function(){};L.jqplot.CanvasGridRenderer=function(){this.shadowRenderer=new L.jqplot.ShadowRenderer()};L.jqplot.CanvasGridRenderer.prototype.init=function(ai){this._ctx;L.extend(true,this,ai);var ah={lineJoin:"miter",lineCap:"round",fill:false,isarc:false,angle:this.shadowAngle,offset:this.shadowOffset,alpha:this.shadowAlpha,depth:this.shadowDepth,lineWidth:this.shadowWidth,closePath:false,strokeStyle:this.shadowColor};this.renderer.shadowRenderer.init(ah)};L.jqplot.CanvasGridRenderer.prototype.createElement=function(ak){var aj;if(this._elem){if(L.jqplot.use_excanvas&&window.G_vmlCanvasManager.uninitElement!==u){aj=this._elem.get(0);window.G_vmlCanvasManager.uninitElement(aj);aj=null}this._elem.emptyForce();this._elem=null}aj=ak.canvasManager.getCanvas();var ah=this._plotDimensions.width;var ai=this._plotDimensions.height;aj.width=ah;aj.height=ai;this._elem=L(aj);this._elem.addClass("jqplot-grid-canvas");this._elem.css({position:"absolute",left:0,top:0});aj=ak.canvasManager.initCanvas(aj);this._top=this._offsets.top;this._bottom=ai-this._offsets.bottom;this._left=this._offsets.left;this._right=ah-this._offsets.right;this._width=this._right-this._left;this._height=this._bottom-this._top;aj=null;return this._elem};L.jqplot.CanvasGridRenderer.prototype.draw=function(){this._ctx=this._elem.get(0).getContext("2d");var at=this._ctx;var aw=this._axes;at.save();at.clearRect(0,0,this._plotDimensions.width,this._plotDimensions.height);at.fillStyle=this.backgroundColor||this.background;at.fillRect(this._left,this._top,this._width,this._height);at.save();at.lineJoin="miter";at.lineCap="butt";at.lineWidth=this.gridLineWidth;at.strokeStyle=this.gridLineColor;var aA,az,ap,aq;var am=["xaxis","yaxis","x2axis","y2axis"];for(var ay=4;ay>0;ay--){var aD=am[ay-1];var ah=aw[aD];var aB=ah._ticks;var ar=aB.length;if(ah.show){if(ah.drawBaseline){var aC={};if(ah.baselineWidth!==null){aC.lineWidth=ah.baselineWidth}if(ah.baselineColor!==null){aC.strokeStyle=ah.baselineColor}switch(aD){case"xaxis":ao(this._left,this._bottom,this._right,this._bottom,aC);break;case"yaxis":ao(this._left,this._bottom,this._left,this._top,aC);break;case"x2axis":ao(this._left,this._bottom,this._right,this._bottom,aC);break;case"y2axis":ao(this._right,this._bottom,this._right,this._top,aC);break}}for(var au=ar;au>0;au--){var an=aB[au-1];if(an.show){var ak=Math.round(ah.u2p(an.value))+0.5;switch(aD){case"xaxis":if(an.showGridline&&this.drawGridlines&&((!an.isMinorTick&&ah.drawMajorGridlines)||(an.isMinorTick&&ah.drawMinorGridlines))){ao(ak,this._top,ak,this._bottom)}if(an.showMark&&an.mark&&((!an.isMinorTick&&ah.drawMajorTickMarks)||(an.isMinorTick&&ah.drawMinorTickMarks))){ap=an.markSize;aq=an.mark;var ak=Math.round(ah.u2p(an.value))+0.5;switch(aq){case"outside":aA=this._bottom;az=this._bottom+ap;break;case"inside":aA=this._bottom-ap;az=this._bottom;break;case"cross":aA=this._bottom-ap;az=this._bottom+ap;break;default:aA=this._bottom;az=this._bottom+ap;break}if(this.shadow){this.renderer.shadowRenderer.draw(at,[[ak,aA],[ak,az]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}ao(ak,aA,ak,az)}break;case"yaxis":if(an.showGridline&&this.drawGridlines&&((!an.isMinorTick&&ah.drawMajorGridlines)||(an.isMinorTick&&ah.drawMinorGridlines))){ao(this._right,ak,this._left,ak)}if(an.showMark&&an.mark&&((!an.isMinorTick&&ah.drawMajorTickMarks)||(an.isMinorTick&&ah.drawMinorTickMarks))){ap=an.markSize;aq=an.mark;var ak=Math.round(ah.u2p(an.value))+0.5;switch(aq){case"outside":aA=this._left-ap;az=this._left;break;case"inside":aA=this._left;az=this._left+ap;break;case"cross":aA=this._left-ap;az=this._left+ap;break;default:aA=this._left-ap;az=this._left;break}if(this.shadow){this.renderer.shadowRenderer.draw(at,[[aA,ak],[az,ak]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}ao(aA,ak,az,ak,{strokeStyle:ah.borderColor})}break;case"x2axis":if(an.showGridline&&this.drawGridlines&&((!an.isMinorTick&&ah.drawMajorGridlines)||(an.isMinorTick&&ah.drawMinorGridlines))){ao(ak,this._bottom,ak,this._top)}if(an.showMark&&an.mark&&((!an.isMinorTick&&ah.drawMajorTickMarks)||(an.isMinorTick&&ah.drawMinorTickMarks))){ap=an.markSize;aq=an.mark;var ak=Math.round(ah.u2p(an.value))+0.5;switch(aq){case"outside":aA=this._top-ap;az=this._top;break;case"inside":aA=this._top;az=this._top+ap;break;case"cross":aA=this._top-ap;az=this._top+ap;break;default:aA=this._top-ap;az=this._top;break}if(this.shadow){this.renderer.shadowRenderer.draw(at,[[ak,aA],[ak,az]],{lineCap:"butt",lineWidth:this.gridLineWidth,offset:this.gridLineWidth*0.75,depth:2,fill:false,closePath:false})}ao(ak,aA,ak,az)}break;case"y2axis":if(an.showGridline&&this.drawGridlines&&((!an.isMinorTick&&ah.drawMajorGridlines)||(an.isMinorTick&&ah.drawMinorGridlines))){ao(this._left,ak,this._right,ak)}if(an.showMark&&an.mark&&((!an.isMinorTick&&ah.drawMajorTickMarks)||(an.isMinorTick&&ah.drawMinorTickMarks))){ap=an.markSize;aq=an.mark;var ak=Math.round(ah.u2p(an.value))+0.5;switch(aq){case"outside":aA=this._right;az=this._right+ap;break;case"inside":aA=this._right-ap;az=this._right;break;case"cross":aA=this._right-ap;az=this._right+ap;break;default:aA=this._right;az=this._right+ap;break}if(this.shadow){this.renderer.shadowRenderer.draw(at,[[aA,ak],[az,ak]],{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}ao(aA,ak,az,ak,{strokeStyle:ah.borderColor})}break;default:break}}}an=null}ah=null;aB=null}am=["y3axis","y4axis","y5axis","y6axis","y7axis","y8axis","y9axis","yMidAxis"];for(var ay=7;ay>0;ay--){var ah=aw[am[ay-1]];var aB=ah._ticks;if(ah.show){var ai=aB[ah.numberTicks-1];var al=aB[0];var aj=ah.getLeft();var av=[[aj,ai.getTop()+ai.getHeight()/2],[aj,al.getTop()+al.getHeight()/2+1]];if(this.shadow){this.renderer.shadowRenderer.draw(at,av,{lineCap:"butt",fill:false,closePath:false})}ao(av[0][0],av[0][1],av[1][0],av[1][1],{lineCap:"butt",strokeStyle:ah.borderColor,lineWidth:ah.borderWidth});for(var au=aB.length;au>0;au--){var an=aB[au-1];ap=an.markSize;aq=an.mark;var ak=Math.round(ah.u2p(an.value))+0.5;if(an.showMark&&an.mark){switch(aq){case"outside":aA=aj;az=aj+ap;break;case"inside":aA=aj-ap;az=aj;break;case"cross":aA=aj-ap;az=aj+ap;break;default:aA=aj;az=aj+ap;break}av=[[aA,ak],[az,ak]];if(this.shadow){this.renderer.shadowRenderer.draw(at,av,{lineCap:"butt",lineWidth:this.gridLineWidth*1.5,offset:this.gridLineWidth*0.75,fill:false,closePath:false})}ao(aA,ak,az,ak,{strokeStyle:ah.borderColor})}an=null}al=null}ah=null;aB=null}at.restore();function ao(aH,aG,aE,ax,aF){at.save();aF=aF||{};if(aF.lineWidth==null||aF.lineWidth!=0){L.extend(true,at,aF);at.beginPath();at.moveTo(aH,aG);at.lineTo(aE,ax);at.stroke();at.restore()}}if(this.shadow){var av=[[this._left,this._bottom],[this._right,this._bottom],[this._right,this._top]];this.renderer.shadowRenderer.draw(at,av)}if(this.borderWidth!=0&&this.drawBorder){ao(this._left,this._top,this._right,this._top,{lineCap:"round",strokeStyle:aw.x2axis.borderColor,lineWidth:aw.x2axis.borderWidth});ao(this._right,this._top,this._right,this._bottom,{lineCap:"round",strokeStyle:aw.y2axis.borderColor,lineWidth:aw.y2axis.borderWidth});ao(this._right,this._bottom,this._left,this._bottom,{lineCap:"round",strokeStyle:aw.xaxis.borderColor,lineWidth:aw.xaxis.borderWidth});ao(this._left,this._bottom,this._left,this._top,{lineCap:"round",strokeStyle:aw.yaxis.borderColor,lineWidth:aw.yaxis.borderWidth})}at.restore();at=null;aw=null};L.jqplot.DivTitleRenderer=function(){};L.jqplot.DivTitleRenderer.prototype.init=function(ah){L.extend(true,this,ah)};L.jqplot.DivTitleRenderer.prototype.draw=function(){if(this._elem){this._elem.emptyForce();this._elem=null}var ak=this.renderer;var aj=document.createElement("div");this._elem=L(aj);this._elem.addClass("jqplot-title");if(!this.text){this.show=false;this._elem.height(0);this._elem.width(0)}else{if(this.text){var ah;if(this.color){ah=this.color}else{if(this.textColor){ah=this.textColor}}var ai={position:"absolute",top:"0px",left:"0px"};if(this._plotWidth){ai.width=this._plotWidth+"px"}if(this.fontSize){ai.fontSize=this.fontSize}if(typeof this.textAlign==="string"){ai.textAlign=this.textAlign}else{ai.textAlign="center"}if(ah){ai.color=ah}if(this.paddingBottom){ai.paddingBottom=this.paddingBottom}if(this.fontFamily){ai.fontFamily=this.fontFamily}this._elem.css(ai);if(this.escapeHtml){this._elem.text(this.text)}else{this._elem.html(this.text)}}}aj=null;return this._elem};L.jqplot.DivTitleRenderer.prototype.pack=function(){};var r=0.1;L.jqplot.LinePattern=function(aw,aq){var ap={dotted:[r,L.jqplot.config.dotGapLength],dashed:[L.jqplot.config.dashLength,L.jqplot.config.gapLength],solid:null};if(typeof aq==="string"){if(aq[0]==="."||aq[0]==="-"){var ax=aq;aq=[];for(var ao=0,al=ax.length;ao<al;ao++){if(ax[ao]==="."){aq.push(r)}else{if(ax[ao]==="-"){aq.push(L.jqplot.config.dashLength)}else{continue}}aq.push(L.jqplot.config.gapLength)}}else{aq=ap[aq]}}if(!(aq&&aq.length)){return aw}var ak=0;var ar=aq[0];var au=0;var at=0;var an=0;var ah=0;var av=function(ay,az){aw.moveTo(ay,az);au=ay;at=az;an=ay;ah=az};var aj=function(ay,aE){var aC=aw.lineWidth;var aA=ay-au;var az=aE-at;var aB=Math.sqrt(aA*aA+az*az);if((aB>0)&&(aC>0)){aA/=aB;az/=aB;while(true){var aD=aC*ar;if(aD<aB){au+=aD*aA;at+=aD*az;if((ak&1)==0){aw.lineTo(au,at)}else{aw.moveTo(au,at)}aB-=aD;ak++;if(ak>=aq.length){ak=0}ar=aq[ak]}else{au=ay;at=aE;if((ak&1)==0){aw.lineTo(au,at)}else{aw.moveTo(au,at)}ar-=aB/aC;break}}}};var ai=function(){aw.beginPath()};var am=function(){aj(an,ah)};return{moveTo:av,lineTo:aj,beginPath:ai,closePath:am}};L.jqplot.LineRenderer=function(){this.shapeRenderer=new L.jqplot.ShapeRenderer();this.shadowRenderer=new L.jqplot.ShadowRenderer()};L.jqplot.LineRenderer.prototype.init=function(ai,an){ai=ai||{};this._type="line";this.renderer.animation={show:false,direction:"left",speed:2500,_supported:true};this.renderer.smooth=false;this.renderer.tension=null;this.renderer.constrainSmoothing=true;this.renderer._smoothedData=[];this.renderer._smoothedPlotData=[];this.renderer._hiBandGridData=[];this.renderer._lowBandGridData=[];this.renderer._hiBandSmoothedData=[];this.renderer._lowBandSmoothedData=[];this.renderer.bandData=[];this.renderer.bands={show:false,hiData:[],lowData:[],color:this.color,showLines:false,fill:true,fillColor:null,_min:null,_max:null,interval:"3%"};var al={highlightMouseOver:ai.highlightMouseOver,highlightMouseDown:ai.highlightMouseDown,highlightColor:ai.highlightColor};delete (ai.highlightMouseOver);delete (ai.highlightMouseDown);delete (ai.highlightColor);L.extend(true,this.renderer,ai);this.renderer.options=ai;if(this.renderer.bandData.length>1&&(!ai.bands||ai.bands.show==null)){this.renderer.bands.show=true}else{if(ai.bands&&ai.bands.show==null&&ai.bands.interval!=null){this.renderer.bands.show=true}}if(this.fill){this.renderer.bands.show=false}if(this.renderer.bands.show){this.renderer.initBands.call(this,this.renderer.options,an)}if(this._stack){this.renderer.smooth=false}var am={lineJoin:this.lineJoin,lineCap:this.lineCap,fill:this.fill,isarc:false,strokeStyle:this.color,fillStyle:this.fillColor,lineWidth:this.lineWidth,linePattern:this.linePattern,closePath:this.fill};this.renderer.shapeRenderer.init(am);var aj=ai.shadowOffset;if(aj==null){if(this.lineWidth>2.5){aj=1.25*(1+(Math.atan((this.lineWidth/2.5))/0.785398163-1)*0.6)}else{aj=1.25*Math.atan((this.lineWidth/2.5))/0.785398163}}var ah={lineJoin:this.lineJoin,lineCap:this.lineCap,fill:this.fill,isarc:false,angle:this.shadowAngle,offset:aj,alpha:this.shadowAlpha,depth:this.shadowDepth,lineWidth:this.lineWidth,linePattern:this.linePattern,closePath:this.fill};this.renderer.shadowRenderer.init(ah);this._areaPoints=[];this._boundingBox=[[],[]];if(!this.isTrendline&&this.fill||this.renderer.bands.show){this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColor=null;if(al.highlightMouseDown&&al.highlightMouseOver==null){al.highlightMouseOver=false}L.extend(true,this,{highlightMouseOver:al.highlightMouseOver,highlightMouseDown:al.highlightMouseDown,highlightColor:al.highlightColor});if(!this.highlightColor){var ak=(this.renderer.bands.show)?this.renderer.bands.fillColor:this.fillColor;this.highlightColor=L.jqplot.computeHighlightColors(ak)}if(this.highlighter){this.highlighter.show=false}}if(!this.isTrendline&&an){an.plugins.lineRenderer={};an.postInitHooks.addOnce(z);an.postDrawHooks.addOnce(af);an.eventListenerHooks.addOnce("jqplotMouseMove",h);an.eventListenerHooks.addOnce("jqplotMouseDown",e);an.eventListenerHooks.addOnce("jqplotMouseUp",ad);an.eventListenerHooks.addOnce("jqplotClick",g);an.eventListenerHooks.addOnce("jqplotRightClick",s)}};L.jqplot.LineRenderer.prototype.initBands=function(ak,av){var al=ak.bandData||[];var an=this.renderer.bands;an.hiData=[];an.lowData=[];var aB=this.data;an._max=null;an._min=null;if(al.length==2){if(L.isArray(al[0][0])){var ao;var ah=0,ar=0;for(var aw=0,at=al[0].length;aw<at;aw++){ao=al[0][aw];if((ao[1]!=null&&ao[1]>an._max)||an._max==null){an._max=ao[1]}if((ao[1]!=null&&ao[1]<an._min)||an._min==null){an._min=ao[1]}}for(var aw=0,at=al[1].length;aw<at;aw++){ao=al[1][aw];if((ao[1]!=null&&ao[1]>an._max)||an._max==null){an._max=ao[1];ar=1}if((ao[1]!=null&&ao[1]<an._min)||an._min==null){an._min=ao[1];ah=1}}if(ar===ah){an.show=false}an.hiData=al[ar];an.lowData=al[ah]}else{if(al[0].length===aB.length&&al[1].length===aB.length){var aj=(al[0][0]>al[1][0])?0:1;var aC=(aj)?0:1;for(var aw=0,at=aB.length;aw<at;aw++){an.hiData.push([aB[aw][0],al[aj][aw]]);an.lowData.push([aB[aw][0],al[aC][aw]])}}else{an.show=false}}}else{if(al.length>2&&!L.isArray(al[0][0])){var aj=(al[0][0]>al[0][1])?0:1;var aC=(aj)?0:1;for(var aw=0,at=al.length;aw<at;aw++){an.hiData.push([aB[aw][0],al[aw][aj]]);an.lowData.push([aB[aw][0],al[aw][aC]])}}else{var aq=an.interval;var aA=null;var az=null;var ai=null;var au=null;if(L.isArray(aq)){aA=aq[0];az=aq[1]}else{aA=aq}if(isNaN(aA)){if(aA.charAt(aA.length-1)==="%"){ai="multiply";aA=parseFloat(aA)/100+1}}else{aA=parseFloat(aA);ai="add"}if(az!==null&&isNaN(az)){if(az.charAt(az.length-1)==="%"){au="multiply";az=parseFloat(az)/100+1}}else{if(az!==null){az=parseFloat(az);au="add"}}if(aA!==null){if(az===null){az=-aA;au=ai;if(au==="multiply"){az+=2}}if(aA<az){var ax=aA;aA=az;az=ax;ax=ai;ai=au;au=ax}for(var aw=0,at=aB.length;aw<at;aw++){switch(ai){case"add":an.hiData.push([aB[aw][0],aB[aw][1]+aA]);break;case"multiply":an.hiData.push([aB[aw][0],aB[aw][1]*aA]);break}switch(au){case"add":an.lowData.push([aB[aw][0],aB[aw][1]+az]);break;case"multiply":an.lowData.push([aB[aw][0],aB[aw][1]*az]);break}}}else{an.show=false}}}var am=an.hiData;var ap=an.lowData;for(var aw=0,at=am.length;aw<at;aw++){if((am[aw][1]!=null&&am[aw][1]>an._max)||an._max==null){an._max=am[aw][1]}}for(var aw=0,at=ap.length;aw<at;aw++){if((ap[aw][1]!=null&&ap[aw][1]<an._min)||an._min==null){an._min=ap[aw][1]}}if(an.fillColor===null){var ay=L.jqplot.getColorComponents(an.color);ay[3]=ay[3]*0.5;an.fillColor="rgba("+ay[0]+", "+ay[1]+", "+ay[2]+", "+ay[3]+")"}};function K(ai,ah){return(3.4182054+ah)*Math.pow(ai,-0.3534992)}function n(aj,ai){var ah=Math.sqrt(Math.pow((ai[0]-aj[0]),2)+Math.pow((ai[1]-aj[1]),2));return 5.7648*Math.log(ah)+7.4456}function A(ah){var ai=(Math.exp(2*ah)-1)/(Math.exp(2*ah)+1);return ai}function J(aJ){var at=this.renderer.smooth;var aD=this.canvas.getWidth();var an=this._xaxis.series_p2u;var aG=this._yaxis.series_p2u;var aF=null;var am=null;var az=aJ.length/aD;var aj=[];var ay=[];if(!isNaN(parseFloat(at))){aF=parseFloat(at)}else{aF=K(az,0.5)}var aw=[];var ak=[];for(var aE=0,aA=aJ.length;aE<aA;aE++){aw.push(aJ[aE][1]);ak.push(aJ[aE][0])}function av(aK,aL){if(aK-aL==0){return Math.pow(10,10)}else{return aK-aL}}var ax,ar,aq,ap;var ah=aJ.length-1;for(var al=1,aB=aJ.length;al<aB;al++){var ai=[];var au=[];for(var aC=0;aC<2;aC++){var aE=al-1+aC;if(aE==0||aE==ah){ai[aC]=Math.pow(10,10)}else{if(aw[aE+1]-aw[aE]==0||aw[aE]-aw[aE-1]==0){ai[aC]=0}else{if(((ak[aE+1]-ak[aE])/(aw[aE+1]-aw[aE])+(ak[aE]-ak[aE-1])/(aw[aE]-aw[aE-1]))==0){ai[aC]=0}else{if((aw[aE+1]-aw[aE])*(aw[aE]-aw[aE-1])<0){ai[aC]=0}else{ai[aC]=2/(av(ak[aE+1],ak[aE])/(aw[aE+1]-aw[aE])+av(ak[aE],ak[aE-1])/(aw[aE]-aw[aE-1]))}}}}}if(al==1){ai[0]=3/2*(aw[1]-aw[0])/av(ak[1],ak[0])-ai[1]/2}else{if(al==ah){ai[1]=3/2*(aw[ah]-aw[ah-1])/av(ak[ah],ak[ah-1])-ai[0]/2}}au[0]=-2*(ai[1]+2*ai[0])/av(ak[al],ak[al-1])+6*(aw[al]-aw[al-1])/Math.pow(av(ak[al],ak[al-1]),2);au[1]=2*(2*ai[1]+ai[0])/av(ak[al],ak[al-1])-6*(aw[al]-aw[al-1])/Math.pow(av(ak[al],ak[al-1]),2);ap=1/6*(au[1]-au[0])/av(ak[al],ak[al-1]);aq=1/2*(ak[al]*au[0]-ak[al-1]*au[1])/av(ak[al],ak[al-1]);ar=(aw[al]-aw[al-1]-aq*(Math.pow(ak[al],2)-Math.pow(ak[al-1],2))-ap*(Math.pow(ak[al],3)-Math.pow(ak[al-1],3)))/av(ak[al],ak[al-1]);ax=aw[al-1]-ar*ak[al-1]-aq*Math.pow(ak[al-1],2)-ap*Math.pow(ak[al-1],3);var aI=(ak[al]-ak[al-1])/aF;var aH,ao;for(var aC=0,aA=aF;aC<aA;aC++){aH=[];ao=ak[al-1]+aC*aI;aH.push(ao);aH.push(ax+ar*ao+aq*Math.pow(ao,2)+ap*Math.pow(ao,3));aj.push(aH);ay.push([an(aH[0]),aG(aH[1])])}}aj.push(aJ[aE]);ay.push([an(aJ[aE][0]),aG(aJ[aE][1])]);return[aj,ay]}function F(ap){var ao=this.renderer.smooth;var aU=this.renderer.tension;var ah=this.canvas.getWidth();var aH=this._xaxis.series_p2u;var aq=this._yaxis.series_p2u;var aI=null;var aJ=null;var aT=null;var aO=null;var aM=null;var at=null;var aR=null;var am=null;var aK,aL,aD,aC,aA,ay;var ak,ai,av,au;var aB,az,aN;var aw=[];var aj=[];var al=ap.length/ah;var aS,ax,aF,aG,aE;var ar=[];var an=[];if(!isNaN(parseFloat(ao))){aI=parseFloat(ao)}else{aI=K(al,0.5)}if(!isNaN(parseFloat(aU))){aU=parseFloat(aU)}for(var aQ=0,aP=ap.length-1;aQ<aP;aQ++){if(aU===null){at=Math.abs((ap[aQ+1][1]-ap[aQ][1])/(ap[aQ+1][0]-ap[aQ][0]));aS=0.3;ax=0.6;aF=(ax-aS)/2;aG=2.5;aE=-1.4;am=at/aG+aE;aO=aF*A(am)-aF*A(aE)+aS;if(aQ>0){aR=Math.abs((ap[aQ][1]-ap[aQ-1][1])/(ap[aQ][0]-ap[aQ-1][0]))}am=aR/aG+aE;aM=aF*A(am)-aF*A(aE)+aS;aT=(aO+aM)/2}else{aT=aU}for(aK=0;aK<aI;aK++){aL=aK/aI;aD=(1+2*aL)*Math.pow((1-aL),2);aC=aL*Math.pow((1-aL),2);aA=Math.pow(aL,2)*(3-2*aL);ay=Math.pow(aL,2)*(aL-1);if(ap[aQ-1]){ak=aT*(ap[aQ+1][0]-ap[aQ-1][0]);ai=aT*(ap[aQ+1][1]-ap[aQ-1][1])}else{ak=aT*(ap[aQ+1][0]-ap[aQ][0]);ai=aT*(ap[aQ+1][1]-ap[aQ][1])}if(ap[aQ+2]){av=aT*(ap[aQ+2][0]-ap[aQ][0]);au=aT*(ap[aQ+2][1]-ap[aQ][1])}else{av=aT*(ap[aQ+1][0]-ap[aQ][0]);au=aT*(ap[aQ+1][1]-ap[aQ][1])}aB=aD*ap[aQ][0]+aA*ap[aQ+1][0]+aC*ak+ay*av;az=aD*ap[aQ][1]+aA*ap[aQ+1][1]+aC*ai+ay*au;aN=[aB,az];ar.push(aN);an.push([aH(aB),aq(az)])}}ar.push(ap[aP]);an.push([aH(ap[aP][0]),aq(ap[aP][1])]);return[ar,an]}L.jqplot.LineRenderer.prototype.setGridData=function(ap){var al=this._xaxis.series_u2p;var ah=this._yaxis.series_u2p;var am=this._plotData;var aq=this._prevPlotData;this.gridData=[];this._prevGridData=[];this.renderer._smoothedData=[];this.renderer._smoothedPlotData=[];this.renderer._hiBandGridData=[];this.renderer._lowBandGridData=[];this.renderer._hiBandSmoothedData=[];this.renderer._lowBandSmoothedData=[];var ak=this.renderer.bands;var ai=false;for(var an=0,aj=am.length;an<aj;an++){if(am[an][0]!=null&&am[an][1]!=null){this.gridData.push([al.call(this._xaxis,am[an][0]),ah.call(this._yaxis,am[an][1])])}else{if(am[an][0]==null){ai=true;this.gridData.push([null,ah.call(this._yaxis,am[an][1])])}else{if(am[an][1]==null){ai=true;this.gridData.push([al.call(this._xaxis,am[an][0]),null])}}}if(aq[an]!=null&&aq[an][0]!=null&&aq[an][1]!=null){this._prevGridData.push([al.call(this._xaxis,aq[an][0]),ah.call(this._yaxis,aq[an][1])])}else{if(aq[an]!=null&&aq[an][0]==null){this._prevGridData.push([null,ah.call(this._yaxis,aq[an][1])])}else{if(aq[an]!=null&&aq[an][0]!=null&&aq[an][1]==null){this._prevGridData.push([al.call(this._xaxis,aq[an][0]),null])}}}}if(ai){this.renderer.smooth=false;if(this._type==="line"){ak.show=false}}if(this._type==="line"&&ak.show){for(var an=0,aj=ak.hiData.length;an<aj;an++){this.renderer._hiBandGridData.push([al.call(this._xaxis,ak.hiData[an][0]),ah.call(this._yaxis,ak.hiData[an][1])])}for(var an=0,aj=ak.lowData.length;an<aj;an++){this.renderer._lowBandGridData.push([al.call(this._xaxis,ak.lowData[an][0]),ah.call(this._yaxis,ak.lowData[an][1])])}}if(this._type==="line"&&this.renderer.smooth&&this.gridData.length>2){var ao;if(this.renderer.constrainSmoothing){ao=J.call(this,this.gridData);this.renderer._smoothedData=ao[0];this.renderer._smoothedPlotData=ao[1];if(ak.show){ao=J.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ao[0];ao=J.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ao[0]}ao=null}else{ao=F.call(this,this.gridData);this.renderer._smoothedData=ao[0];this.renderer._smoothedPlotData=ao[1];if(ak.show){ao=F.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ao[0];ao=F.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ao[0]}ao=null}}};L.jqplot.LineRenderer.prototype.makeGridData=function(ao,aq){var am=this._xaxis.series_u2p;var ah=this._yaxis.series_u2p;var ar=[];var aj=[];this.renderer._smoothedData=[];this.renderer._smoothedPlotData=[];this.renderer._hiBandGridData=[];this.renderer._lowBandGridData=[];this.renderer._hiBandSmoothedData=[];this.renderer._lowBandSmoothedData=[];var al=this.renderer.bands;var ai=false;for(var an=0;an<ao.length;an++){if(ao[an][0]!=null&&ao[an][1]!=null){ar.push([am.call(this._xaxis,ao[an][0]),ah.call(this._yaxis,ao[an][1])])}else{if(ao[an][0]==null){ai=true;ar.push([null,ah.call(this._yaxis,ao[an][1])])}else{if(ao[an][1]==null){ai=true;ar.push([am.call(this._xaxis,ao[an][0]),null])}}}}if(ai){this.renderer.smooth=false;if(this._type==="line"){al.show=false}}if(this._type==="line"&&al.show){for(var an=0,ak=al.hiData.length;an<ak;an++){this.renderer._hiBandGridData.push([am.call(this._xaxis,al.hiData[an][0]),ah.call(this._yaxis,al.hiData[an][1])])}for(var an=0,ak=al.lowData.length;an<ak;an++){this.renderer._lowBandGridData.push([am.call(this._xaxis,al.lowData[an][0]),ah.call(this._yaxis,al.lowData[an][1])])}}if(this._type==="line"&&this.renderer.smooth&&ar.length>2){var ap;if(this.renderer.constrainSmoothing){ap=J.call(this,ar);this.renderer._smoothedData=ap[0];this.renderer._smoothedPlotData=ap[1];if(al.show){ap=J.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ap[0];ap=J.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ap[0]}ap=null}else{ap=F.call(this,ar);this.renderer._smoothedData=ap[0];this.renderer._smoothedPlotData=ap[1];if(al.show){ap=F.call(this,this.renderer._hiBandGridData);this.renderer._hiBandSmoothedData=ap[0];ap=F.call(this,this.renderer._lowBandGridData);this.renderer._lowBandSmoothedData=ap[0]}ap=null}}return ar};L.jqplot.LineRenderer.prototype.draw=function(ax,aI,ai,aB){var aC;var aq=L.extend(true,{},ai);var ak=(aq.shadow!=u)?aq.shadow:this.shadow;var aJ=(aq.showLine!=u)?aq.showLine:this.showLine;var aA=(aq.fill!=u)?aq.fill:this.fill;var ah=(aq.fillAndStroke!=u)?aq.fillAndStroke:this.fillAndStroke;var ar,ay,av,aE;ax.save();if(aI.length){if(aJ){if(aA){if(this.fillToZero){var aF=this.negativeColor;if(!this.useNegativeColors){aF=aq.fillStyle}var ao=false;var ap=aq.fillStyle;if(ah){var aH=aI.slice(0)}if(this.index==0||!this._stack){var aw=[];var aL=(this.renderer.smooth)?this.renderer._smoothedPlotData:this._plotData;this._areaPoints=[];var aG=this._yaxis.series_u2p(this.fillToValue);var aj=this._xaxis.series_u2p(this.fillToValue);aq.closePath=true;if(this.fillAxis=="y"){aw.push([aI[0][0],aG]);this._areaPoints.push([aI[0][0],aG]);for(var aC=0;aC<aI.length-1;aC++){aw.push(aI[aC]);this._areaPoints.push(aI[aC]);if(aL[aC][1]*aL[aC+1][1]<=0){if(aL[aC][1]<0){ao=true;aq.fillStyle=aF}else{ao=false;aq.fillStyle=ap}var an=aI[aC][0]+(aI[aC+1][0]-aI[aC][0])*(aG-aI[aC][1])/(aI[aC+1][1]-aI[aC][1]);aw.push([an,aG]);this._areaPoints.push([an,aG]);if(ak){this.renderer.shadowRenderer.draw(ax,aw,aq)}this.renderer.shapeRenderer.draw(ax,aw,aq);aw=[[an,aG]]}}if(aL[aI.length-1][1]<0){ao=true;aq.fillStyle=aF}else{ao=false;aq.fillStyle=ap}aw.push(aI[aI.length-1]);this._areaPoints.push(aI[aI.length-1]);aw.push([aI[aI.length-1][0],aG]);this._areaPoints.push([aI[aI.length-1][0],aG])}if(ak){this.renderer.shadowRenderer.draw(ax,aw,aq)}this.renderer.shapeRenderer.draw(ax,aw,aq)}else{var au=this._prevGridData;for(var aC=au.length;aC>0;aC--){aI.push(au[aC-1])}if(ak){this.renderer.shadowRenderer.draw(ax,aI,aq)}this._areaPoints=aI;this.renderer.shapeRenderer.draw(ax,aI,aq)}}else{if(ah){var aH=aI.slice(0)}if(this.index==0||!this._stack){var al=ax.canvas.height;aI.unshift([aI[0][0],al]);var aD=aI.length;aI.push([aI[aD-1][0],al])}else{var au=this._prevGridData;for(var aC=au.length;aC>0;aC--){aI.push(au[aC-1])}}this._areaPoints=aI;if(ak){this.renderer.shadowRenderer.draw(ax,aI,aq)}this.renderer.shapeRenderer.draw(ax,aI,aq)}if(ah){var az=L.extend(true,{},aq,{fill:false,closePath:false});this.renderer.shapeRenderer.draw(ax,aH,az);if(this.markerRenderer.show){if(this.renderer.smooth){aH=this.gridData}for(aC=0;aC<aH.length;aC++){this.markerRenderer.draw(aH[aC][0],aH[aC][1],ax,aq.markerOptions)}}}}else{if(this.renderer.bands.show){var am;var aK=L.extend(true,{},aq);if(this.renderer.bands.showLines){am=(this.renderer.smooth)?this.renderer._hiBandSmoothedData:this.renderer._hiBandGridData;this.renderer.shapeRenderer.draw(ax,am,aq);am=(this.renderer.smooth)?this.renderer._lowBandSmoothedData:this.renderer._lowBandGridData;this.renderer.shapeRenderer.draw(ax,am,aK)}if(this.renderer.bands.fill){if(this.renderer.smooth){am=this.renderer._hiBandSmoothedData.concat(this.renderer._lowBandSmoothedData.reverse())}else{am=this.renderer._hiBandGridData.concat(this.renderer._lowBandGridData.reverse())}this._areaPoints=am;aK.closePath=true;aK.fill=true;aK.fillStyle=this.renderer.bands.fillColor;this.renderer.shapeRenderer.draw(ax,am,aK)}}if(ak){this.renderer.shadowRenderer.draw(ax,aI,aq)}this.renderer.shapeRenderer.draw(ax,aI,aq)}}var ar=av=ay=aE=null;for(aC=0;aC<this._areaPoints.length;aC++){var at=this._areaPoints[aC];if(ar>at[0]||ar==null){ar=at[0]}if(aE<at[1]||aE==null){aE=at[1]}if(av<at[0]||av==null){av=at[0]}if(ay>at[1]||ay==null){ay=at[1]}}if(this.type==="line"&&this.renderer.bands.show){aE=this._yaxis.series_u2p(this.renderer.bands._min);ay=this._yaxis.series_u2p(this.renderer.bands._max)}this._boundingBox=[[ar,aE],[av,ay]];if(this.markerRenderer.show&&!aA){if(this.renderer.smooth){aI=this.gridData}for(aC=0;aC<aI.length;aC++){if(aI[aC][0]!=null&&aI[aC][1]!=null){this.markerRenderer.draw(aI[aC][0],aI[aC][1],ax,aq.markerOptions)}}}}ax.restore()};L.jqplot.LineRenderer.prototype.drawShadow=function(ah,aj,ai){};function z(ak,aj,ah){for(var ai=0;ai<this.series.length;ai++){if(this.series[ai].renderer.constructor==L.jqplot.LineRenderer){if(this.series[ai].highlightMouseOver){this.series[ai].highlightMouseDown=false}}}}function af(){if(this.plugins.lineRenderer&&this.plugins.lineRenderer.highlightCanvas){this.plugins.lineRenderer.highlightCanvas.resetCanvas();this.plugins.lineRenderer.highlightCanvas=null}this.plugins.lineRenderer.highlightedSeriesIndex=null;this.plugins.lineRenderer.highlightCanvas=new L.jqplot.GenericCanvas();this.eventCanvas._elem.before(this.plugins.lineRenderer.highlightCanvas.createElement(this._gridPadding,"jqplot-lineRenderer-highlight-canvas",this._plotDimensions,this));this.plugins.lineRenderer.highlightCanvas.setContext();this.eventCanvas._elem.bind("mouseleave",{plot:this},function(ah){aa(ah.data.plot)})}function ac(an,am,ak,aj){var ai=an.series[am];var ah=an.plugins.lineRenderer.highlightCanvas;ah._ctx.clearRect(0,0,ah._ctx.canvas.width,ah._ctx.canvas.height);ai._highlightedPoint=ak;an.plugins.lineRenderer.highlightedSeriesIndex=am;var al={fillStyle:ai.highlightColor};if(ai.type==="line"&&ai.renderer.bands.show){al.fill=true;al.closePath=true}ai.renderer.shapeRenderer.draw(ah._ctx,aj,al);ah=null}function aa(aj){var ah=aj.plugins.lineRenderer.highlightCanvas;ah._ctx.clearRect(0,0,ah._ctx.canvas.width,ah._ctx.canvas.height);for(var ai=0;ai<aj.series.length;ai++){aj.series[ai]._highlightedPoint=null}aj.plugins.lineRenderer.highlightedSeriesIndex=null;aj.target.trigger("jqplotDataUnhighlight");ah=null}function h(al,ak,ao,an,am){if(an){var aj=[an.seriesIndex,an.pointIndex,an.data];var ai=jQuery.Event("jqplotDataMouseOver");ai.pageX=al.pageX;ai.pageY=al.pageY;am.target.trigger(ai,aj);if(am.series[aj[0]].highlightMouseOver&&!(aj[0]==am.plugins.lineRenderer.highlightedSeriesIndex)){var ah=jQuery.Event("jqplotDataHighlight");ah.which=al.which;ah.pageX=al.pageX;ah.pageY=al.pageY;am.target.trigger(ah,aj);ac(am,an.seriesIndex,an.pointIndex,an.points)}}else{if(an==null){aa(am)}}}function e(ak,aj,an,am,al){if(am){var ai=[am.seriesIndex,am.pointIndex,am.data];if(al.series[ai[0]].highlightMouseDown&&!(ai[0]==al.plugins.lineRenderer.highlightedSeriesIndex)){var ah=jQuery.Event("jqplotDataHighlight");ah.which=ak.which;ah.pageX=ak.pageX;ah.pageY=ak.pageY;al.target.trigger(ah,ai);ac(al,am.seriesIndex,am.pointIndex,am.points)}}else{if(am==null){aa(al)}}}function ad(aj,ai,am,al,ak){var ah=ak.plugins.lineRenderer.highlightedSeriesIndex;if(ah!=null&&ak.series[ah].highlightMouseDown){aa(ak)}}function g(ak,aj,an,am,al){if(am){var ai=[am.seriesIndex,am.pointIndex,am.data];var ah=jQuery.Event("jqplotDataClick");ah.which=ak.which;ah.pageX=ak.pageX;ah.pageY=ak.pageY;al.target.trigger(ah,ai)}}function s(al,ak,ao,an,am){if(an){var aj=[an.seriesIndex,an.pointIndex,an.data];var ah=am.plugins.lineRenderer.highlightedSeriesIndex;if(ah!=null&&am.series[ah].highlightMouseDown){aa(am)}var ai=jQuery.Event("jqplotDataRightClick");ai.which=al.which;ai.pageX=al.pageX;ai.pageY=al.pageY;am.target.trigger(ai,aj)}}L.jqplot.LinearAxisRenderer=function(){};L.jqplot.LinearAxisRenderer.prototype.init=function(ah){this.breakPoints=null;this.breakTickLabel="≈";this.drawBaseline=true;this.baselineWidth=null;this.baselineColor=null;this.forceTickAt0=false;this.forceTickAt100=false;this.tickInset=0;this.minorTicks=0;this.alignTicks=false;this._autoFormatString="";this._overrideFormatString=false;this._scalefact=1;L.extend(true,this,ah);if(this.breakPoints){if(!L.isArray(this.breakPoints)){this.breakPoints=null}else{if(this.breakPoints.length<2||this.breakPoints[1]<=this.breakPoints[0]){this.breakPoints=null}}}if(this.numberTicks!=null&&this.numberTicks<2){this.numberTicks=2}this.resetDataBounds()};L.jqplot.LinearAxisRenderer.prototype.draw=function(ah,ao){if(this.show){this.renderer.createTicks.call(this,ao);var an=0;var ai;if(this._elem){this._elem.emptyForce();this._elem=null}this._elem=L(document.createElement("div"));this._elem.addClass("jqplot-axis jqplot-"+this.name);this._elem.css("position","absolute");if(this.name=="xaxis"||this.name=="x2axis"){this._elem.width(this._plotDimensions.width)}else{this._elem.height(this._plotDimensions.height)}this.labelOptions.axis=this.name;this._label=new this.labelRenderer(this.labelOptions);if(this._label.show){var am=this._label.draw(ah,ao);am.appendTo(this._elem);am=null}var al=this._ticks;var ak;for(var aj=0;aj<al.length;aj++){ak=al[aj];if(ak.show&&ak.showLabel&&(!ak.isMinorTick||this.showMinorTicks)){this._elem.append(ak.draw(ah,ao))}}ak=null;al=null}return this._elem};L.jqplot.LinearAxisRenderer.prototype.reset=function(){this.min=this._options.min;this.max=this._options.max;this.tickInterval=this._options.tickInterval;this.numberTicks=this._options.numberTicks;this._autoFormatString="";if(this._overrideFormatString&&this.tickOptions&&this.tickOptions.formatString){this.tickOptions.formatString=""}};L.jqplot.LinearAxisRenderer.prototype.set=function(){var ao=0;var aj;var ai=0;var an=0;var ah=(this._label==null)?false:this._label.show;if(this.show){var am=this._ticks;var al;for(var ak=0;ak<am.length;ak++){al=am[ak];if(!al._breakTick&&al.show&&al.showLabel&&(!al.isMinorTick||this.showMinorTicks)){if(this.name=="xaxis"||this.name=="x2axis"){aj=al._elem.outerHeight(true)}else{aj=al._elem.outerWidth(true)}if(aj>ao){ao=aj}}}al=null;am=null;if(ah){ai=this._label._elem.outerWidth(true);an=this._label._elem.outerHeight(true)}if(this.name=="xaxis"){ao=ao+an;this._elem.css({height:ao+"px",left:"0px",bottom:"0px"})}else{if(this.name=="x2axis"){ao=ao+an;this._elem.css({height:ao+"px",left:"0px",top:"0px"})}else{if(this.name=="yaxis"){ao=ao+ai;this._elem.css({width:ao+"px",left:"0px",top:"0px"});if(ah&&this._label.constructor==L.jqplot.AxisLabelRenderer){this._label._elem.css("width",ai+"px")}}else{ao=ao+ai;this._elem.css({width:ao+"px",right:"0px",top:"0px"});if(ah&&this._label.constructor==L.jqplot.AxisLabelRenderer){this._label._elem.css("width",ai+"px")}}}}}};L.jqplot.LinearAxisRenderer.prototype.createTicks=function(aj){var aT=this._ticks;var aK=this.ticks;var az=this.name;var aB=this._dataBounds;var ah=(this.name.charAt(0)==="x")?this._plotDimensions.width:this._plotDimensions.height;var an;var a6,aI;var ap,ao;var a4,a0;var aH=this.min;var a5=this.max;var aW=this.numberTicks;var ba=this.tickInterval;var am=30;this._scalefact=(Math.max(ah,am+1)-am)/300;if(aK.length){for(a0=0;a0<aK.length;a0++){var aO=aK[a0];var aU=new this.tickRenderer(this.tickOptions);if(L.isArray(aO)){aU.value=aO[0];if(this.breakPoints){if(aO[0]==this.breakPoints[0]){aU.label=this.breakTickLabel;aU._breakTick=true;aU.showGridline=false;aU.showMark=false}else{if(aO[0]>this.breakPoints[0]&&aO[0]<=this.breakPoints[1]){aU.show=false;aU.showGridline=false;aU.label=aO[1]}else{aU.label=aO[1]}}}else{aU.label=aO[1]}aU.setTick(aO[0],this.name);this._ticks.push(aU)}else{if(L.isPlainObject(aO)){L.extend(true,aU,aO);aU.axis=this.name;this._ticks.push(aU)}else{aU.value=aO;if(this.breakPoints){if(aO==this.breakPoints[0]){aU.label=this.breakTickLabel;aU._breakTick=true;aU.showGridline=false;aU.showMark=false}else{if(aO>this.breakPoints[0]&&aO<=this.breakPoints[1]){aU.show=false;aU.showGridline=false}}}aU.setTick(aO,this.name);this._ticks.push(aU)}}}this.numberTicks=aK.length;this.min=this._ticks[0].value;this.max=this._ticks[this.numberTicks-1].value;this.tickInterval=(this.max-this.min)/(this.numberTicks-1)}else{if(az=="xaxis"||az=="x2axis"){ah=this._plotDimensions.width}else{ah=this._plotDimensions.height}var ax=this.numberTicks;if(this.alignTicks){if(this.name==="x2axis"&&aj.axes.xaxis.show){ax=aj.axes.xaxis.numberTicks}else{if(this.name.charAt(0)==="y"&&this.name!=="yaxis"&&this.name!=="yMidAxis"&&aj.axes.yaxis.show){ax=aj.axes.yaxis.numberTicks}}}a6=((this.min!=null)?this.min:aB.min);aI=((this.max!=null)?this.max:aB.max);var av=aI-a6;var aS,ay;var at;if(this.tickOptions==null||!this.tickOptions.formatString){this._overrideFormatString=true}if(this.min==null||this.max==null&&this.tickInterval==null&&!this.autoscale){if(this.forceTickAt0){if(a6>0){a6=0}if(aI<0){aI=0}}if(this.forceTickAt100){if(a6>100){a6=100}if(aI<100){aI=100}}var aE=false,a1=false;if(this.min!=null){aE=true}else{if(this.max!=null){a1=true}}var aP=L.jqplot.LinearTickGenerator(a6,aI,this._scalefact,ax,aE,a1);var aw=(this.min!=null)?a6:a6+av*(this.padMin-1);var aQ=(this.max!=null)?aI:aI-av*(this.padMax-1);if(a6<aw||aI>aQ){aw=(this.min!=null)?a6:a6-av*(this.padMin-1);aQ=(this.max!=null)?aI:aI+av*(this.padMax-1);aP=L.jqplot.LinearTickGenerator(aw,aQ,this._scalefact,ax,aE,a1)}this.min=aP[0];this.max=aP[1];this.numberTicks=aP[2];this._autoFormatString=aP[3];this.tickInterval=aP[4]}else{if(a6==aI){var ai=0.05;if(a6>0){ai=Math.max(Math.log(a6)/Math.LN10,0.05)}a6-=ai;aI+=ai}if(this.autoscale&&this.min==null&&this.max==null){var ak,al,ar;var aC=false;var aN=false;var aA={min:null,max:null,average:null,stddev:null};for(var a0=0;a0<this._series.length;a0++){var aV=this._series[a0];var aD=(aV.fillAxis=="x")?aV._xaxis.name:aV._yaxis.name;if(this.name==aD){var aR=aV._plotValues[aV.fillAxis];var aG=aR[0];var a2=aR[0];for(var aZ=1;aZ<aR.length;aZ++){if(aR[aZ]<aG){aG=aR[aZ]}else{if(aR[aZ]>a2){a2=aR[aZ]}}}var au=(a2-aG)/a2;if(aV.renderer.constructor==L.jqplot.BarRenderer){if(aG>=0&&(aV.fillToZero||au>0.1)){aC=true}else{aC=false;if(aV.fill&&aV.fillToZero&&aG<0&&a2>0){aN=true}else{aN=false}}}else{if(aV.fill){if(aG>=0&&(aV.fillToZero||au>0.1)){aC=true}else{if(aG<0&&a2>0&&aV.fillToZero){aC=false;aN=true}else{aC=false;aN=false}}}else{if(aG<0){aC=false}}}}}if(aC){this.numberTicks=2+Math.ceil((ah-(this.tickSpacing-1))/this.tickSpacing);this.min=0;aH=0;al=aI/(this.numberTicks-1);at=Math.pow(10,Math.abs(Math.floor(Math.log(al)/Math.LN10)));if(al/at==parseInt(al/at,10)){al+=at}this.tickInterval=Math.ceil(al/at)*at;this.max=this.tickInterval*(this.numberTicks-1)}else{if(aN){this.numberTicks=2+Math.ceil((ah-(this.tickSpacing-1))/this.tickSpacing);var aJ=Math.ceil(Math.abs(a6)/av*(this.numberTicks-1));var a9=this.numberTicks-1-aJ;al=Math.max(Math.abs(a6/aJ),Math.abs(aI/a9));at=Math.pow(10,Math.abs(Math.floor(Math.log(al)/Math.LN10)));this.tickInterval=Math.ceil(al/at)*at;this.max=this.tickInterval*a9;this.min=-this.tickInterval*aJ}else{if(this.numberTicks==null){if(this.tickInterval){this.numberTicks=3+Math.ceil(av/this.tickInterval)}else{this.numberTicks=2+Math.ceil((ah-(this.tickSpacing-1))/this.tickSpacing)}}if(this.tickInterval==null){al=av/(this.numberTicks-1);if(al<1){at=Math.pow(10,Math.abs(Math.floor(Math.log(al)/Math.LN10)))}else{at=1}this.tickInterval=Math.ceil(al*at*this.pad)/at}else{at=1/this.tickInterval}ak=this.tickInterval*(this.numberTicks-1);ar=(ak-av)/2;if(this.min==null){this.min=Math.floor(at*(a6-ar))/at}if(this.max==null){this.max=this.min+ak}}}var aF=L.jqplot.getSignificantFigures(this.tickInterval);var aM;if(aF.digitsLeft>=aF.significantDigits){aM="%d"}else{var at=Math.max(0,5-aF.digitsLeft);at=Math.min(at,aF.digitsRight);aM="%."+at+"f"}this._autoFormatString=aM}else{aS=(this.min!=null)?this.min:a6-av*(this.padMin-1);ay=(this.max!=null)?this.max:aI+av*(this.padMax-1);av=ay-aS;if(this.numberTicks==null){if(this.tickInterval!=null){this.numberTicks=Math.ceil((ay-aS)/this.tickInterval)+1}else{if(ah>100){this.numberTicks=parseInt(3+(ah-100)/75,10)}else{this.numberTicks=2}}}if(this.tickInterval==null){this.tickInterval=av/(this.numberTicks-1)}if(this.max==null){ay=aS+this.tickInterval*(this.numberTicks-1)}if(this.min==null){aS=ay-this.tickInterval*(this.numberTicks-1)}var aF=L.jqplot.getSignificantFigures(this.tickInterval);var aM;if(aF.digitsLeft>=aF.significantDigits){aM="%d"}else{var at=Math.max(0,5-aF.digitsLeft);at=Math.min(at,aF.digitsRight);aM="%."+at+"f"}this._autoFormatString=aM;this.min=aS;this.max=ay}if(this.renderer.constructor==L.jqplot.LinearAxisRenderer&&this._autoFormatString==""){av=this.max-this.min;var a7=new this.tickRenderer(this.tickOptions);var aL=a7.formatString||L.jqplot.config.defaultTickFormatString;var aL=aL.match(L.jqplot.sprintf.regex)[0];var a3=0;if(aL){if(aL.search(/[fFeEgGpP]/)>-1){var aY=aL.match(/\%\.(\d{0,})?[eEfFgGpP]/);if(aY){a3=parseInt(aY[1],10)}else{a3=6}}else{if(aL.search(/[di]/)>-1){a3=0}}var aq=Math.pow(10,-a3);if(this.tickInterval<aq){if(aW==null&&ba==null){this.tickInterval=aq;if(a5==null&&aH==null){this.min=Math.floor(this._dataBounds.min/aq)*aq;if(this.min==this._dataBounds.min){this.min=this._dataBounds.min-this.tickInterval}this.max=Math.ceil(this._dataBounds.max/aq)*aq;if(this.max==this._dataBounds.max){this.max=this._dataBounds.max+this.tickInterval}var aX=(this.max-this.min)/this.tickInterval;aX=aX.toFixed(11);aX=Math.ceil(aX);this.numberTicks=aX+1}else{if(a5==null){var aX=(this._dataBounds.max-this.min)/this.tickInterval;aX=aX.toFixed(11);this.numberTicks=Math.ceil(aX)+2;this.max=this.min+this.tickInterval*(this.numberTicks-1)}else{if(aH==null){var aX=(this.max-this._dataBounds.min)/this.tickInterval;aX=aX.toFixed(11);this.numberTicks=Math.ceil(aX)+2;this.min=this.max-this.tickInterval*(this.numberTicks-1)}else{this.numberTicks=Math.ceil((a5-aH)/this.tickInterval)+1;this.min=Math.floor(aH*Math.pow(10,a3))/Math.pow(10,a3);this.max=Math.ceil(a5*Math.pow(10,a3))/Math.pow(10,a3);this.numberTicks=Math.ceil((this.max-this.min)/this.tickInterval)+1}}}}}}}}if(this._overrideFormatString&&this._autoFormatString!=""){this.tickOptions=this.tickOptions||{};this.tickOptions.formatString=this._autoFormatString}var aU,a8;for(var a0=0;a0<this.numberTicks;a0++){a4=this.min+a0*this.tickInterval;aU=new this.tickRenderer(this.tickOptions);aU.setTick(a4,this.name);this._ticks.push(aU);if(a0<this.numberTicks-1){for(var aZ=0;aZ<this.minorTicks;aZ++){a4+=this.tickInterval/(this.minorTicks+1);a8=L.extend(true,{},this.tickOptions,{name:this.name,value:a4,label:"",isMinorTick:true});aU=new this.tickRenderer(a8);this._ticks.push(aU)}}aU=null}}if(this.tickInset){this.min=this.min-this.tickInset*this.tickInterval;this.max=this.max+this.tickInset*this.tickInterval}aT=null};L.jqplot.LinearAxisRenderer.prototype.resetTickValues=function(aj){if(L.isArray(aj)&&aj.length==this._ticks.length){var ai;for(var ah=0;ah<aj.length;ah++){ai=this._ticks[ah];ai.value=aj[ah];ai.label=ai.formatter(ai.formatString,aj[ah]);ai.label=ai.prefix+ai.label;ai._elem.html(ai.label)}ai=null;this.min=L.jqplot.arrayMin(aj);this.max=L.jqplot.arrayMax(aj);this.pack()}};L.jqplot.LinearAxisRenderer.prototype.pack=function(aj,ai){aj=aj||{};ai=ai||this._offsets;var ay=this._ticks;var au=this.max;var at=this.min;var ao=ai.max;var am=ai.min;var aq=(this._label==null)?false:this._label.show;for(var ar in aj){this._elem.css(ar,aj[ar])}this._offsets=ai;var ak=ao-am;var al=au-at;if(this.breakPoints){al=al-this.breakPoints[1]+this.breakPoints[0];this.p2u=function(aA){return(aA-am)*al/ak+at};this.u2p=function(aA){if(aA>this.breakPoints[0]&&aA<this.breakPoints[1]){aA=this.breakPoints[0]}if(aA<=this.breakPoints[0]){return(aA-at)*ak/al+am}else{return(aA-this.breakPoints[1]+this.breakPoints[0]-at)*ak/al+am}};if(this.name.charAt(0)=="x"){this.series_u2p=function(aA){if(aA>this.breakPoints[0]&&aA<this.breakPoints[1]){aA=this.breakPoints[0]}if(aA<=this.breakPoints[0]){return(aA-at)*ak/al}else{return(aA-this.breakPoints[1]+this.breakPoints[0]-at)*ak/al}};this.series_p2u=function(aA){return aA*al/ak+at}}else{this.series_u2p=function(aA){if(aA>this.breakPoints[0]&&aA<this.breakPoints[1]){aA=this.breakPoints[0]}if(aA>=this.breakPoints[1]){return(aA-au)*ak/al}else{return(aA+this.breakPoints[1]-this.breakPoints[0]-au)*ak/al}};this.series_p2u=function(aA){return aA*al/ak+au}}}else{this.p2u=function(aA){return(aA-am)*al/ak+at};this.u2p=function(aA){return(aA-at)*ak/al+am};if(this.name=="xaxis"||this.name=="x2axis"){this.series_u2p=function(aA){return(aA-at)*ak/al};this.series_p2u=function(aA){return aA*al/ak+at}}else{this.series_u2p=function(aA){return(aA-au)*ak/al};this.series_p2u=function(aA){return aA*al/ak+au}}}if(this.show){if(this.name=="xaxis"||this.name=="x2axis"){for(var av=0;av<ay.length;av++){var ap=ay[av];if(ap.show&&ap.showLabel){var ah;if(ap.constructor==L.jqplot.CanvasAxisTickRenderer&&ap.angle){var ax=(this.name=="xaxis")?1:-1;switch(ap.labelPosition){case"auto":if(ax*ap.angle<0){ah=-ap.getWidth()+ap._textRenderer.height*Math.sin(-ap._textRenderer.angle)/2}else{ah=-ap._textRenderer.height*Math.sin(ap._textRenderer.angle)/2}break;case"end":ah=-ap.getWidth()+ap._textRenderer.height*Math.sin(-ap._textRenderer.angle)/2;break;case"start":ah=-ap._textRenderer.height*Math.sin(ap._textRenderer.angle)/2;break;case"middle":ah=-ap.getWidth()/2+ap._textRenderer.height*Math.sin(-ap._textRenderer.angle)/2;break;default:ah=-ap.getWidth()/2+ap._textRenderer.height*Math.sin(-ap._textRenderer.angle)/2;break}}else{ah=-ap.getWidth()/2}var az=this.u2p(ap.value)+ah+"px";ap._elem.css("left",az);ap.pack()}}if(aq){var an=this._label._elem.outerWidth(true);this._label._elem.css("left",am+ak/2-an/2+"px");if(this.name=="xaxis"){this._label._elem.css("bottom","0px")}else{this._label._elem.css("top","0px")}this._label.pack()}}else{for(var av=0;av<ay.length;av++){var ap=ay[av];if(ap.show&&ap.showLabel){var ah;if(ap.constructor==L.jqplot.CanvasAxisTickRenderer&&ap.angle){var ax=(this.name=="yaxis")?1:-1;switch(ap.labelPosition){case"auto":case"end":if(ax*ap.angle<0){ah=-ap._textRenderer.height*Math.cos(-ap._textRenderer.angle)/2}else{ah=-ap.getHeight()+ap._textRenderer.height*Math.cos(ap._textRenderer.angle)/2}break;case"start":if(ap.angle>0){ah=-ap._textRenderer.height*Math.cos(-ap._textRenderer.angle)/2}else{ah=-ap.getHeight()+ap._textRenderer.height*Math.cos(ap._textRenderer.angle)/2}break;case"middle":ah=-ap.getHeight()/2;break;default:ah=-ap.getHeight()/2;break}}else{ah=-ap.getHeight()/2}var az=this.u2p(ap.value)+ah+"px";ap._elem.css("top",az);ap.pack()}}if(aq){var aw=this._label._elem.outerHeight(true);this._label._elem.css("top",ao-ak/2-aw/2+"px");if(this.name=="yaxis"){this._label._elem.css("left","0px")}else{this._label._elem.css("right","0px")}this._label.pack()}}}ay=null};function i(ai){var ah;ai=Math.abs(ai);if(ai>=10){ah="%d"}else{if(ai>1){if(ai===parseInt(ai,10)){ah="%d"}else{ah="%.1f"}}else{var aj=-Math.floor(Math.log(ai)/Math.LN10);ah="%."+aj+"f"}}return ah}var b=[0.1,0.2,0.3,0.4,0.5,0.8,1,2,3,4,5];var c=function(ai){var ah=b.indexOf(ai);if(ah>0){return b[ah-1]}else{return b[b.length-1]/100}};var k=function(ai){var ah=b.indexOf(ai);if(ah<b.length-1){return b[ah+1]}else{return b[0]*100}};function d(al,au,at){var aq=Math.floor(at/2);var ai=Math.ceil(at*1.5);var ak=Number.MAX_VALUE;var ah=(au-al);var ax;var ap;var ar;var ay=L.jqplot.getSignificantFigures;var aw;var an;var ao;var av;for(var am=0,aj=ai-aq+1;am<aj;am++){ao=aq+am;ax=ah/(ao-1);ap=ay(ax);ax=Math.abs(at-ao)+ap.digitsRight;if(ax<ak){ak=ax;ar=ao;av=ap.digitsRight}else{if(ax===ak){if(ap.digitsRight<av){ar=ao;av=ap.digitsRight}}}}aw=Math.max(av,Math.max(ay(al).digitsRight,ay(au).digitsRight));if(aw===0){an="%d"}else{an="%."+aw+"f"}ax=ah/(ar-1);return[al,au,ar,an,ax]}function W(ai,al){al=al||7;var ak=ai/(al-1);var aj=Math.pow(10,Math.floor(Math.log(ak)/Math.LN10));var am=ak/aj;var ah;if(aj<1){if(am>5){ah=10*aj}else{if(am>2){ah=5*aj}else{if(am>1){ah=2*aj}else{ah=aj}}}}else{if(am>5){ah=10*aj}else{if(am>4){ah=5*aj}else{if(am>3){ah=4*aj}else{if(am>2){ah=3*aj}else{if(am>1){ah=2*aj}else{ah=aj}}}}}}return ah}function Q(ai,ah){ah=ah||1;var ak=Math.floor(Math.log(ai)/Math.LN10);var am=Math.pow(10,ak);var al=ai/am;var aj;al=al/ah;if(al<=0.38){aj=0.1}else{if(al<=1.6){aj=0.2}else{if(al<=4){aj=0.5}else{if(al<=8){aj=1}else{if(al<=16){aj=2}else{aj=5}}}}}return aj*am}function x(aj,ai){var al=Math.floor(Math.log(aj)/Math.LN10);var an=Math.pow(10,al);var am=aj/an;var ah;var ak;am=am/ai;if(am<=0.38){ak=0.1}else{if(am<=1.6){ak=0.2}else{if(am<=4){ak=0.5}else{if(am<=8){ak=1}else{if(am<=16){ak=2}else{ak=5}}}}}ah=ak*an;return[ah,ak,an]}L.jqplot.LinearTickGenerator=function(an,aq,aj,ak,ao,ar){ao=(ao===null)?false:ao;ar=(ar===null||ao)?false:ar;if(an===aq){aq=(aq)?0:1}aj=aj||1;if(aq<an){var at=aq;aq=an;an=at}var ai=[];var aw=Q(aq-an,aj);var av=L.jqplot.getSignificantFigures;if(ak==null){if(!ao&&!ar){ai[0]=Math.floor(an/aw)*aw;ai[1]=Math.ceil(aq/aw)*aw;ai[2]=Math.round((ai[1]-ai[0])/aw+1);ai[3]=i(aw);ai[4]=aw}else{if(ao){ai[0]=an;ai[2]=Math.ceil((aq-an)/aw+1);ai[1]=an+(ai[2]-1)*aw;var au=av(an).digitsRight;var ap=av(aw).digitsRight;if(au<ap){ai[3]=i(aw)}else{ai[3]="%."+au+"f"}ai[4]=aw}else{if(ar){ai[1]=aq;ai[2]=Math.ceil((aq-an)/aw+1);ai[0]=aq-(ai[2]-1)*aw;var al=av(aq).digitsRight;var ap=av(aw).digitsRight;if(al<ap){ai[3]=i(aw)}else{ai[3]="%."+al+"f"}ai[4]=aw}}}}else{var am=[];am[0]=Math.floor(an/aw)*aw;am[1]=Math.ceil(aq/aw)*aw;am[2]=Math.round((am[1]-am[0])/aw+1);am[3]=i(aw);am[4]=aw;if(am[2]===ak){ai=am}else{var ah=W(am[1]-am[0],ak);ai[0]=am[0];ai[2]=ak;ai[4]=ah;ai[3]=i(ah);ai[1]=ai[0]+(ai[2]-1)*ai[4]}}return ai};L.jqplot.LinearTickGenerator.bestLinearInterval=Q;L.jqplot.LinearTickGenerator.bestInterval=W;L.jqplot.LinearTickGenerator.bestLinearComponents=x;L.jqplot.LinearTickGenerator.bestConstrainedInterval=d;L.jqplot.MarkerRenderer=function(ah){this.show=true;this.style="filledCircle";this.lineWidth=2;this.size=9;this.color="#666666";this.shadow=true;this.shadowAngle=45;this.shadowOffset=1;this.shadowDepth=3;this.shadowAlpha="0.07";this.shadowRenderer=new L.jqplot.ShadowRenderer();this.shapeRenderer=new L.jqplot.ShapeRenderer();L.extend(true,this,ah)};L.jqplot.MarkerRenderer.prototype.init=function(ah){L.extend(true,this,ah);var aj={angle:this.shadowAngle,offset:this.shadowOffset,alpha:this.shadowAlpha,lineWidth:this.lineWidth,depth:this.shadowDepth,closePath:true};if(this.style.indexOf("filled")!=-1){aj.fill=true}if(this.style.indexOf("ircle")!=-1){aj.isarc=true;aj.closePath=false}this.shadowRenderer.init(aj);var ai={fill:false,isarc:false,strokeStyle:this.color,fillStyle:this.color,lineWidth:this.lineWidth,closePath:true};if(this.style.indexOf("filled")!=-1){ai.fill=true}if(this.style.indexOf("ircle")!=-1){ai.isarc=true;ai.closePath=false}this.shapeRenderer.init(ai)};L.jqplot.MarkerRenderer.prototype.drawDiamond=function(aj,ai,am,al,ao){var ah=1.2;var ap=this.size/2/ah;var an=this.size/2*ah;var ak=[[aj-ap,ai],[aj,ai+an],[aj+ap,ai],[aj,ai-an]];if(this.shadow){this.shadowRenderer.draw(am,ak)}this.shapeRenderer.draw(am,ak,ao)};L.jqplot.MarkerRenderer.prototype.drawPlus=function(ak,aj,an,am,aq){var ai=1;var ar=this.size/2*ai;var ao=this.size/2*ai;var ap=[[ak,aj-ao],[ak,aj+ao]];var al=[[ak+ar,aj],[ak-ar,aj]];var ah=L.extend(true,{},this.options,{closePath:false});if(this.shadow){this.shadowRenderer.draw(an,ap,{closePath:false});this.shadowRenderer.draw(an,al,{closePath:false})}this.shapeRenderer.draw(an,ap,ah);this.shapeRenderer.draw(an,al,ah)};L.jqplot.MarkerRenderer.prototype.drawX=function(ak,aj,an,am,aq){var ai=1;var ar=this.size/2*ai;var ao=this.size/2*ai;var ah=L.extend(true,{},this.options,{closePath:false});var ap=[[ak-ar,aj-ao],[ak+ar,aj+ao]];var al=[[ak-ar,aj+ao],[ak+ar,aj-ao]];if(this.shadow){this.shadowRenderer.draw(an,ap,{closePath:false});this.shadowRenderer.draw(an,al,{closePath:false})}this.shapeRenderer.draw(an,ap,ah);this.shapeRenderer.draw(an,al,ah)};L.jqplot.MarkerRenderer.prototype.drawDash=function(aj,ai,am,al,ao){var ah=1;var ap=this.size/2*ah;var an=this.size/2*ah;var ak=[[aj-ap,ai],[aj+ap,ai]];if(this.shadow){this.shadowRenderer.draw(am,ak)}this.shapeRenderer.draw(am,ak,ao)};L.jqplot.MarkerRenderer.prototype.drawLine=function(am,al,ah,ak,ai){var aj=[am,al];if(this.shadow){this.shadowRenderer.draw(ah,aj)}this.shapeRenderer.draw(ah,aj,ai)};L.jqplot.MarkerRenderer.prototype.drawSquare=function(aj,ai,am,al,ao){var ah=1;var ap=this.size/2/ah;var an=this.size/2*ah;var ak=[[aj-ap,ai-an],[aj-ap,ai+an],[aj+ap,ai+an],[aj+ap,ai-an]];if(this.shadow){this.shadowRenderer.draw(am,ak)}this.shapeRenderer.draw(am,ak,ao)};L.jqplot.MarkerRenderer.prototype.drawCircle=function(ai,ao,ak,an,al){var ah=this.size/2;var aj=2*Math.PI;var am=[ai,ao,ah,0,aj,true];if(this.shadow){this.shadowRenderer.draw(ak,am)}this.shapeRenderer.draw(ak,am,al)};L.jqplot.MarkerRenderer.prototype.draw=function(ah,ak,ai,aj){aj=aj||{};if(aj.show==null||aj.show!=false){if(aj.color&&!aj.fillStyle){aj.fillStyle=aj.color}if(aj.color&&!aj.strokeStyle){aj.strokeStyle=aj.color}switch(this.style){case"diamond":this.drawDiamond(ah,ak,ai,false,aj);break;case"filledDiamond":this.drawDiamond(ah,ak,ai,true,aj);break;case"circle":this.drawCircle(ah,ak,ai,false,aj);break;case"filledCircle":this.drawCircle(ah,ak,ai,true,aj);break;case"square":this.drawSquare(ah,ak,ai,false,aj);break;case"filledSquare":this.drawSquare(ah,ak,ai,true,aj);break;case"x":this.drawX(ah,ak,ai,true,aj);break;case"plus":this.drawPlus(ah,ak,ai,true,aj);break;case"dash":this.drawDash(ah,ak,ai,true,aj);break;case"line":this.drawLine(ah,ak,ai,false,aj);break;default:this.drawDiamond(ah,ak,ai,false,aj);break}}};L.jqplot.ShadowRenderer=function(ah){this.angle=45;this.offset=1;this.alpha=0.07;this.lineWidth=1.5;this.lineJoin="miter";this.lineCap="round";this.closePath=false;this.fill=false;this.depth=3;this.strokeStyle="rgba(0,0,0,0.1)";this.isarc=false;L.extend(true,this,ah)};L.jqplot.ShadowRenderer.prototype.init=function(ah){L.extend(true,this,ah)};L.jqplot.ShadowRenderer.prototype.draw=function(av,at,ax){av.save();var ah=(ax!=null)?ax:{};var au=(ah.fill!=null)?ah.fill:this.fill;var ap=(ah.fillRect!=null)?ah.fillRect:this.fillRect;var ao=(ah.closePath!=null)?ah.closePath:this.closePath;var al=(ah.offset!=null)?ah.offset:this.offset;var aj=(ah.alpha!=null)?ah.alpha:this.alpha;var an=(ah.depth!=null)?ah.depth:this.depth;var aw=(ah.isarc!=null)?ah.isarc:this.isarc;var aq=(ah.linePattern!=null)?ah.linePattern:this.linePattern;av.lineWidth=(ah.lineWidth!=null)?ah.lineWidth:this.lineWidth;av.lineJoin=(ah.lineJoin!=null)?ah.lineJoin:this.lineJoin;av.lineCap=(ah.lineCap!=null)?ah.lineCap:this.lineCap;av.strokeStyle=ah.strokeStyle||this.strokeStyle||"rgba(0,0,0,"+aj+")";av.fillStyle=ah.fillStyle||this.fillStyle||"rgba(0,0,0,"+aj+")";for(var ak=0;ak<an;ak++){var ar=L.jqplot.LinePattern(av,aq);av.translate(Math.cos(this.angle*Math.PI/180)*al,Math.sin(this.angle*Math.PI/180)*al);ar.beginPath();if(aw){av.arc(at[0],at[1],at[2],at[3],at[4],true)}else{if(ap){if(ap){av.fillRect(at[0],at[1],at[2],at[3])}}else{if(at&&at.length){var ai=true;for(var am=0;am<at.length;am++){if(at[am][0]!=null&&at[am][1]!=null){if(ai){ar.moveTo(at[am][0],at[am][1]);ai=false}else{ar.lineTo(at[am][0],at[am][1])}}else{ai=true}}}}}if(ao){ar.closePath()}if(au){av.fill()}else{av.stroke()}}av.restore()};L.jqplot.ShapeRenderer=function(ah){this.lineWidth=1.5;this.linePattern="solid";this.lineJoin="miter";this.lineCap="round";this.closePath=false;this.fill=false;this.isarc=false;this.fillRect=false;this.strokeRect=false;this.clearRect=false;this.strokeStyle="#999999";this.fillStyle="#999999";L.extend(true,this,ah)};L.jqplot.ShapeRenderer.prototype.init=function(ah){L.extend(true,this,ah)};L.jqplot.ShapeRenderer.prototype.draw=function(at,aq,av){at.save();var ah=(av!=null)?av:{};var ar=(ah.fill!=null)?ah.fill:this.fill;var am=(ah.closePath!=null)?ah.closePath:this.closePath;var an=(ah.fillRect!=null)?ah.fillRect:this.fillRect;var ak=(ah.strokeRect!=null)?ah.strokeRect:this.strokeRect;var ai=(ah.clearRect!=null)?ah.clearRect:this.clearRect;var au=(ah.isarc!=null)?ah.isarc:this.isarc;var ao=(ah.linePattern!=null)?ah.linePattern:this.linePattern;var ap=L.jqplot.LinePattern(at,ao);at.lineWidth=ah.lineWidth||this.lineWidth;at.lineJoin=ah.lineJoin||this.lineJoin;at.lineCap=ah.lineCap||this.lineCap;at.strokeStyle=(ah.strokeStyle||ah.color)||this.strokeStyle;at.fillStyle=ah.fillStyle||this.fillStyle;at.beginPath();if(au){at.arc(aq[0],aq[1],aq[2],aq[3],aq[4],true);if(am){at.closePath()}if(ar){at.fill()}else{at.stroke()}at.restore();return}else{if(ai){at.clearRect(aq[0],aq[1],aq[2],aq[3]);at.restore();return}else{if(an||ak){if(an){at.fillRect(aq[0],aq[1],aq[2],aq[3])}if(ak){at.strokeRect(aq[0],aq[1],aq[2],aq[3]);at.restore();return}}else{if(aq&&aq.length){var aj=true;for(var al=0;al<aq.length;al++){if(aq[al][0]!=null&&aq[al][1]!=null){if(aj){ap.moveTo(aq[al][0],aq[al][1]);aj=false}else{ap.lineTo(aq[al][0],aq[al][1])}}else{aj=true}}if(am){ap.closePath()}if(ar){at.fill()}else{at.stroke()}}}}}at.restore()};L.jqplot.TableLegendRenderer=function(){};L.jqplot.TableLegendRenderer.prototype.init=function(ah){L.extend(true,this,ah)};L.jqplot.TableLegendRenderer.prototype.addrow=function(aq,ak,ah,ao){var al=(ah)?this.rowSpacing+"px":"0px";var ap;var aj;var ai;var an;var am;ai=document.createElement("tr");ap=L(ai);ap.addClass("jqplot-table-legend");ai=null;if(ao){ap.prependTo(this._elem)}else{ap.appendTo(this._elem)}if(this.showSwatches){aj=L(document.createElement("td"));aj.addClass("jqplot-table-legend jqplot-table-legend-swatch");aj.css({textAlign:"center",paddingTop:al});an=L(document.createElement("div"));an.addClass("jqplot-table-legend-swatch-outline");am=L(document.createElement("div"));am.addClass("jqplot-table-legend-swatch");am.css({backgroundColor:ak,borderColor:ak});ap.append(aj.append(an.append(am)))}if(this.showLabels){aj=L(document.createElement("td"));aj.addClass("jqplot-table-legend jqplot-table-legend-label");aj.css("paddingTop",al);ap.append(aj);if(this.escapeHtml){aj.text(aq)}else{aj.html(aq)}}aj=null;an=null;am=null;ap=null;ai=null};L.jqplot.TableLegendRenderer.prototype.draw=function(){if(this._elem){this._elem.emptyForce();this._elem=null}if(this.show){var am=this._series;var ai=document.createElement("table");this._elem=L(ai);this._elem.addClass("jqplot-table-legend");var ar={position:"absolute"};if(this.background){ar.background=this.background}if(this.border){ar.border=this.border}if(this.fontSize){ar.fontSize=this.fontSize}if(this.fontFamily){ar.fontFamily=this.fontFamily}if(this.textColor){ar.textColor=this.textColor}if(this.marginTop!=null){ar.marginTop=this.marginTop}if(this.marginBottom!=null){ar.marginBottom=this.marginBottom}if(this.marginLeft!=null){ar.marginLeft=this.marginLeft}if(this.marginRight!=null){ar.marginRight=this.marginRight}var ah=false,ao=false,aq;for(var an=0;an<am.length;an++){aq=am[an];if(aq._stack||aq.renderer.constructor==L.jqplot.BezierCurveRenderer){ao=true}if(aq.show&&aq.showLabel){var al=this.labels[an]||aq.label.toString();if(al){var aj=aq.color;if(ao&&an<am.length-1){ah=true}else{if(ao&&an==am.length-1){ah=false}}this.renderer.addrow.call(this,al,aj,ah,ao);ah=true}for(var ak=0;ak<L.jqplot.addLegendRowHooks.length;ak++){var ap=L.jqplot.addLegendRowHooks[ak].call(this,aq);if(ap){this.renderer.addrow.call(this,ap.label,ap.color,ah);ah=true}}al=null}}}return this._elem};L.jqplot.TableLegendRenderer.prototype.pack=function(aj){if(this.show){if(this.placement=="insideGrid"){switch(this.location){case"nw":var ai=aj.left;var ah=aj.top;this._elem.css("left",ai);this._elem.css("top",ah);break;case"n":var ai=(aj.left+(this._plotDimensions.width-aj.right))/2-this.getWidth()/2;var ah=aj.top;this._elem.css("left",ai);this._elem.css("top",ah);break;case"ne":var ai=aj.right;var ah=aj.top;this._elem.css({right:ai,top:ah});break;case"e":var ai=aj.right;var ah=(aj.top+(this._plotDimensions.height-aj.bottom))/2-this.getHeight()/2;this._elem.css({right:ai,top:ah});break;case"se":var ai=aj.right;var ah=aj.bottom;this._elem.css({right:ai,bottom:ah});break;case"s":var ai=(aj.left+(this._plotDimensions.width-aj.right))/2-this.getWidth()/2;var ah=aj.bottom;this._elem.css({left:ai,bottom:ah});break;case"sw":var ai=aj.left;var ah=aj.bottom;this._elem.css({left:ai,bottom:ah});break;case"w":var ai=aj.left;var ah=(aj.top+(this._plotDimensions.height-aj.bottom))/2-this.getHeight()/2;this._elem.css({left:ai,top:ah});break;default:var ai=aj.right;var ah=aj.bottom;this._elem.css({right:ai,bottom:ah});break}}else{if(this.placement=="outside"){switch(this.location){case"nw":var ai=this._plotDimensions.width-aj.left;var ah=aj.top;this._elem.css("right",ai);this._elem.css("top",ah);break;case"n":var ai=(aj.left+(this._plotDimensions.width-aj.right))/2-this.getWidth()/2;var ah=this._plotDimensions.height-aj.top;this._elem.css("left",ai);this._elem.css("bottom",ah);break;case"ne":var ai=this._plotDimensions.width-aj.right;var ah=aj.top;this._elem.css({left:ai,top:ah});break;case"e":var ai=this._plotDimensions.width-aj.right;var ah=(aj.top+(this._plotDimensions.height-aj.bottom))/2-this.getHeight()/2;this._elem.css({left:ai,top:ah});break;case"se":var ai=this._plotDimensions.width-aj.right;var ah=aj.bottom;this._elem.css({left:ai,bottom:ah});break;case"s":var ai=(aj.left+(this._plotDimensions.width-aj.right))/2-this.getWidth()/2;var ah=this._plotDimensions.height-aj.bottom;this._elem.css({left:ai,top:ah});break;case"sw":var ai=this._plotDimensions.width-aj.left;var ah=aj.bottom;this._elem.css({right:ai,bottom:ah});break;case"w":var ai=this._plotDimensions.width-aj.left;var ah=(aj.top+(this._plotDimensions.height-aj.bottom))/2-this.getHeight()/2;this._elem.css({right:ai,top:ah});break;default:var ai=aj.right;var ah=aj.bottom;this._elem.css({right:ai,bottom:ah});break}}else{switch(this.location){case"nw":this._elem.css({left:0,top:aj.top});break;case"n":var ai=(aj.left+(this._plotDimensions.width-aj.right))/2-this.getWidth()/2;this._elem.css({left:ai,top:aj.top});break;case"ne":this._elem.css({right:0,top:aj.top});break;case"e":var ah=(aj.top+(this._plotDimensions.height-aj.bottom))/2-this.getHeight()/2;this._elem.css({right:aj.right,top:ah});break;case"se":this._elem.css({right:aj.right,bottom:aj.bottom});break;case"s":var ai=(aj.left+(this._plotDimensions.width-aj.right))/2-this.getWidth()/2;this._elem.css({left:ai,bottom:aj.bottom});break;case"sw":this._elem.css({left:aj.left,bottom:aj.bottom});break;case"w":var ah=(aj.top+(this._plotDimensions.height-aj.bottom))/2-this.getHeight()/2;this._elem.css({left:aj.left,top:ah});break;default:this._elem.css({right:aj.right,bottom:aj.bottom});break}}}}};L.jqplot.ThemeEngine=function(){this.themes={};this.activeTheme=null};L.jqplot.ThemeEngine.prototype.init=function(){var ak=new L.jqplot.Theme({_name:"Default"});var an,ai,am;for(an in ak.target){if(an=="textColor"){ak.target[an]=this.target.css("color")}else{ak.target[an]=this.target.css(an)}}if(this.title.show&&this.title._elem){for(an in ak.title){if(an=="textColor"){ak.title[an]=this.title._elem.css("color")}else{ak.title[an]=this.title._elem.css(an)}}}for(an in ak.grid){ak.grid[an]=this.grid[an]}if(ak.grid.backgroundColor==null&&this.grid.background!=null){ak.grid.backgroundColor=this.grid.background}if(this.legend.show&&this.legend._elem){for(an in ak.legend){if(an=="textColor"){ak.legend[an]=this.legend._elem.css("color")}else{ak.legend[an]=this.legend._elem.css(an)}}}var aj;for(ai=0;ai<this.series.length;ai++){aj=this.series[ai];if(aj.renderer.constructor==L.jqplot.LineRenderer){ak.series.push(new p())}else{if(aj.renderer.constructor==L.jqplot.BarRenderer){ak.series.push(new T())}else{if(aj.renderer.constructor==L.jqplot.PieRenderer){ak.series.push(new f())}else{if(aj.renderer.constructor==L.jqplot.DonutRenderer){ak.series.push(new G())}else{if(aj.renderer.constructor==L.jqplot.FunnelRenderer){ak.series.push(new Z())}else{if(aj.renderer.constructor==L.jqplot.MeterGaugeRenderer){ak.series.push(new D())}else{ak.series.push({})}}}}}}for(an in ak.series[ai]){ak.series[ai][an]=aj[an]}}var ah,al;for(an in this.axes){al=this.axes[an];ah=ak.axes[an]=new P();ah.borderColor=al.borderColor;ah.borderWidth=al.borderWidth;if(al._ticks&&al._ticks[0]){for(am in ah.ticks){if(al._ticks[0].hasOwnProperty(am)){ah.ticks[am]=al._ticks[0][am]}else{if(al._ticks[0]._elem){ah.ticks[am]=al._ticks[0]._elem.css(am)}}}}if(al._label&&al._label.show){for(am in ah.label){if(al._label[am]){ah.label[am]=al._label[am]}else{if(al._label._elem){if(am=="textColor"){ah.label[am]=al._label._elem.css("color")}else{ah.label[am]=al._label._elem.css(am)}}}}}}this.themeEngine._add(ak);this.themeEngine.activeTheme=this.themeEngine.themes[ak._name]};L.jqplot.ThemeEngine.prototype.get=function(ah){if(!ah){return this.activeTheme}else{return this.themes[ah]}};function O(ai,ah){return ai-ah}L.jqplot.ThemeEngine.prototype.getThemeNames=function(){var ah=[];for(var ai in this.themes){ah.push(ai)}return ah.sort(O)};L.jqplot.ThemeEngine.prototype.getThemes=function(){var ai=[];var ah=[];for(var ak in this.themes){ai.push(ak)}ai.sort(O);for(var aj=0;aj<ai.length;aj++){ah.push(this.themes[ai[aj]])}return ah};L.jqplot.ThemeEngine.prototype.activate=function(av,aB){var ah=false;if(!aB&&this.activeTheme&&this.activeTheme._name){aB=this.activeTheme._name}if(!this.themes.hasOwnProperty(aB)){throw new Error("No theme of that name")}else{var am=this.themes[aB];this.activeTheme=am;var aA,at=false,ar=false;var ai=["xaxis","x2axis","yaxis","y2axis"];for(aw=0;aw<ai.length;aw++){var an=ai[aw];if(am.axesStyles.borderColor!=null){av.axes[an].borderColor=am.axesStyles.borderColor}if(am.axesStyles.borderWidth!=null){av.axes[an].borderWidth=am.axesStyles.borderWidth}}for(var az in av.axes){var ak=av.axes[az];if(ak.show){var aq=am.axes[az]||{};var ao=am.axesStyles;var al=L.jqplot.extend(true,{},aq,ao);aA=(am.axesStyles.borderColor!=null)?am.axesStyles.borderColor:al.borderColor;if(al.borderColor!=null){ak.borderColor=al.borderColor;ah=true}aA=(am.axesStyles.borderWidth!=null)?am.axesStyles.borderWidth:al.borderWidth;if(al.borderWidth!=null){ak.borderWidth=al.borderWidth;ah=true}if(ak._ticks&&ak._ticks[0]){for(var aj in al.ticks){aA=al.ticks[aj];if(aA!=null){ak.tickOptions[aj]=aA;ak._ticks=[];ah=true}}}if(ak._label&&ak._label.show){for(var aj in al.label){aA=al.label[aj];if(aA!=null){ak.labelOptions[aj]=aA;ah=true}}}}}for(var au in am.grid){if(am.grid[au]!=null){av.grid[au]=am.grid[au]}}if(!ah){av.grid.draw()}if(av.legend.show){for(au in am.legend){if(am.legend[au]!=null){av.legend[au]=am.legend[au]}}}if(av.title.show){for(au in am.title){if(am.title[au]!=null){av.title[au]=am.title[au]}}}var aw;for(aw=0;aw<am.series.length;aw++){var ap={};var ay=false;for(au in am.series[aw]){aA=(am.seriesStyles[au]!=null)?am.seriesStyles[au]:am.series[aw][au];if(aA!=null){ap[au]=aA;if(au=="color"){av.series[aw].renderer.shapeRenderer.fillStyle=aA;av.series[aw].renderer.shapeRenderer.strokeStyle=aA;av.series[aw][au]=aA}else{if((au=="lineWidth")||(au=="linePattern")){av.series[aw].renderer.shapeRenderer[au]=aA;av.series[aw][au]=aA}else{if(au=="markerOptions"){V(av.series[aw].markerOptions,aA);V(av.series[aw].markerRenderer,aA)}else{av.series[aw][au]=aA}}}ah=true}}}if(ah){av.target.empty();av.draw()}for(au in am.target){if(am.target[au]!=null){av.target.css(au,am.target[au])}}}};L.jqplot.ThemeEngine.prototype._add=function(ai,ah){if(ah){ai._name=ah}if(!ai._name){ai._name=Date.parse(new Date())}if(!this.themes.hasOwnProperty(ai._name)){this.themes[ai._name]=ai}else{throw new Error("jqplot.ThemeEngine Error: Theme already in use")}};L.jqplot.ThemeEngine.prototype.remove=function(ah){if(ah=="Default"){return false}return delete this.themes[ah]};L.jqplot.ThemeEngine.prototype.newTheme=function(ah,aj){if(typeof(ah)=="object"){aj=aj||ah;ah=null}if(aj&&aj._name){ah=aj._name}else{ah=ah||Date.parse(new Date())}var ai=this.copy(this.themes.Default._name,ah);L.jqplot.extend(ai,aj);return ai};function B(aj){if(aj==null||typeof(aj)!="object"){return aj}var ah=new aj.constructor();for(var ai in aj){ah[ai]=B(aj[ai])}return ah}L.jqplot.clone=B;function V(aj,ai){if(ai==null||typeof(ai)!="object"){return}for(var ah in ai){if(ah=="highlightColors"){aj[ah]=B(ai[ah])}if(ai[ah]!=null&&typeof(ai[ah])=="object"){if(!aj.hasOwnProperty(ah)){aj[ah]={}}V(aj[ah],ai[ah])}else{aj[ah]=ai[ah]}}}L.jqplot.merge=V;L.jqplot.extend=function(){var am=arguments[0]||{},ak=1,al=arguments.length,ah=false,aj;if(typeof am==="boolean"){ah=am;am=arguments[1]||{};ak=2}if(typeof am!=="object"&&!toString.call(am)==="[object Function]"){am={}}for(;ak<al;ak++){if((aj=arguments[ak])!=null){for(var ai in aj){var an=am[ai],ao=aj[ai];if(am===ao){continue}if(ah&&ao&&typeof ao==="object"&&!ao.nodeType){am[ai]=L.jqplot.extend(ah,an||(ao.length!=null?[]:{}),ao)}else{if(ao!==u){am[ai]=ao}}}}}return am};L.jqplot.ThemeEngine.prototype.rename=function(ai,ah){if(ai=="Default"||ah=="Default"){throw new Error("jqplot.ThemeEngine Error: Cannot rename from/to Default")}if(this.themes.hasOwnProperty(ah)){throw new Error("jqplot.ThemeEngine Error: New name already in use.")}else{if(this.themes.hasOwnProperty(ai)){var aj=this.copy(ai,ah);this.remove(ai);return aj}}throw new Error("jqplot.ThemeEngine Error: Old name or new name invalid")};L.jqplot.ThemeEngine.prototype.copy=function(ah,aj,al){if(aj=="Default"){throw new Error("jqplot.ThemeEngine Error: Cannot copy over Default theme")}if(!this.themes.hasOwnProperty(ah)){var ai="jqplot.ThemeEngine Error: Source name invalid";throw new Error(ai)}if(this.themes.hasOwnProperty(aj)){var ai="jqplot.ThemeEngine Error: Target name invalid";throw new Error(ai)}else{var ak=B(this.themes[ah]);ak._name=aj;L.jqplot.extend(true,ak,al);this._add(ak);return ak}};L.jqplot.Theme=function(ah,ai){if(typeof(ah)=="object"){ai=ai||ah;ah=null}ah=ah||Date.parse(new Date());this._name=ah;this.target={backgroundColor:null};this.legend={textColor:null,fontFamily:null,fontSize:null,border:null,background:null};this.title={textColor:null,fontFamily:null,fontSize:null,textAlign:null};this.seriesStyles={};this.series=[];this.grid={drawGridlines:null,gridLineColor:null,gridLineWidth:null,backgroundColor:null,borderColor:null,borderWidth:null,shadow:null};this.axesStyles={label:{},ticks:{}};this.axes={};if(typeof(ai)=="string"){this._name=ai}else{if(typeof(ai)=="object"){L.jqplot.extend(true,this,ai)}}};var P=function(){this.borderColor=null;this.borderWidth=null;this.ticks=new o();this.label=new t()};var o=function(){this.show=null;this.showGridline=null;this.showLabel=null;this.showMark=null;this.size=null;this.textColor=null;this.whiteSpace=null;this.fontSize=null;this.fontFamily=null};var t=function(){this.textColor=null;this.whiteSpace=null;this.fontSize=null;this.fontFamily=null;this.fontWeight=null};var p=function(){this.color=null;this.lineWidth=null;this.linePattern=null;this.shadow=null;this.fillColor=null;this.showMarker=null;this.markerOptions=new I()};var I=function(){this.show=null;this.style=null;this.lineWidth=null;this.size=null;this.color=null;this.shadow=null};var T=function(){this.color=null;this.seriesColors=null;this.lineWidth=null;this.shadow=null;this.barPadding=null;this.barMargin=null;this.barWidth=null;this.highlightColors=null};var f=function(){this.seriesColors=null;this.padding=null;this.sliceMargin=null;this.fill=null;this.shadow=null;this.startAngle=null;this.lineWidth=null;this.highlightColors=null};var G=function(){this.seriesColors=null;this.padding=null;this.sliceMargin=null;this.fill=null;this.shadow=null;this.startAngle=null;this.lineWidth=null;this.innerDiameter=null;this.thickness=null;this.ringMargin=null;this.highlightColors=null};var Z=function(){this.color=null;this.lineWidth=null;this.shadow=null;this.padding=null;this.sectionMargin=null;this.seriesColors=null;this.highlightColors=null};var D=function(){this.padding=null;this.backgroundColor=null;this.ringColor=null;this.tickColor=null;this.ringWidth=null;this.intervalColors=null;this.intervalInnerRadius=null;this.intervalOuterRadius=null;this.hubRadius=null;this.needleThickness=null;this.needlePad=null};L.fn.jqplotChildText=function(){return L(this).contents().filter(function(){return this.nodeType==3}).text()};L.fn.jqplotGetComputedFontStyle=function(){var ak=window.getComputedStyle?window.getComputedStyle(this[0],""):this[0].currentStyle;var ai=ak["font-style"]?["font-style","font-weight","font-size","font-family"]:["fontStyle","fontWeight","fontSize","fontFamily"];var al=[];for(var aj=0;aj<ai.length;++aj){var ah=String(ak[ai[aj]]);if(ah&&ah!="normal"){al.push(ah)}}return al.join(" ")};L.fn.jqplotToImageCanvas=function(aj){aj=aj||{};var av=(aj.x_offset==null)?0:aj.x_offset;var ax=(aj.y_offset==null)?0:aj.y_offset;var al=(aj.backgroundColor==null)?"rgb(255,255,255)":aj.backgroundColor;if(L(this).width()==0||L(this).height()==0){return null}if(L.jqplot.use_excanvas){return null}var an=document.createElement("canvas");var aA=L(this).outerHeight(true);var at=L(this).outerWidth(true);var am=L(this).offset();var ao=am.left;var aq=am.top;var au=0,ar=0;var ay=["jqplot-table-legend","jqplot-xaxis-tick","jqplot-x2axis-tick","jqplot-yaxis-tick","jqplot-y2axis-tick","jqplot-y3axis-tick","jqplot-y4axis-tick","jqplot-y5axis-tick","jqplot-y6axis-tick","jqplot-y7axis-tick","jqplot-y8axis-tick","jqplot-y9axis-tick","jqplot-xaxis-label","jqplot-x2axis-label","jqplot-yaxis-label","jqplot-y2axis-label","jqplot-y3axis-label","jqplot-y4axis-label","jqplot-y5axis-label","jqplot-y6axis-label","jqplot-y7axis-label","jqplot-y8axis-label","jqplot-y9axis-label"];var ap,ah,ai,aB;for(var az=0;az<ay.length;az++){L(this).find("."+ay[az]).each(function(){ap=L(this).offset().top-aq;ah=L(this).offset().left-ao;aB=ah+L(this).outerWidth(true)+au;ai=ap+L(this).outerHeight(true)+ar;if(ah<-au){at=at-au-ah;au=-ah}if(ap<-ar){aA=aA-ar-ap;ar=-ap}if(aB>at){at=aB}if(ai>aA){aA=ai}})}an.width=at+Number(av);an.height=aA+Number(ax);var ak=an.getContext("2d");ak.save();ak.fillStyle=al;ak.fillRect(0,0,an.width,an.height);ak.restore();ak.translate(au,ar);ak.textAlign="left";ak.textBaseline="top";function aC(aE){var aF=parseInt(L(aE).css("line-height"),10);if(isNaN(aF)){aF=parseInt(L(aE).css("font-size"),10)*1.2}return aF}function aD(aF,aE,aS,aG,aO,aH){var aQ=aC(aF);var aK=L(aF).innerWidth();var aL=L(aF).innerHeight();var aN=aS.split(/\s+/);var aR=aN.length;var aP="";var aM=[];var aU=aO;var aT=aG;for(var aJ=0;aJ<aR;aJ++){aP+=aN[aJ];if(aE.measureText(aP).width>aK){aM.push(aJ);aP="";aJ--}}if(aM.length===0){if(L(aF).css("textAlign")==="center"){aT=aG+(aH-aE.measureText(aP).width)/2-au}aE.fillText(aS,aT,aO)}else{aP=aN.slice(0,aM[0]).join(" ");if(L(aF).css("textAlign")==="center"){aT=aG+(aH-aE.measureText(aP).width)/2-au}aE.fillText(aP,aT,aU);aU+=aQ;for(var aJ=1,aI=aM.length;aJ<aI;aJ++){aP=aN.slice(aM[aJ-1],aM[aJ]).join(" ");if(L(aF).css("textAlign")==="center"){aT=aG+(aH-aE.measureText(aP).width)/2-au}aE.fillText(aP,aT,aU);aU+=aQ}aP=aN.slice(aM[aJ-1],aN.length).join(" ");if(L(aF).css("textAlign")==="center"){aT=aG+(aH-aE.measureText(aP).width)/2-au}aE.fillText(aP,aT,aU)}}function aw(aG,aJ,aE){var aN=aG.tagName.toLowerCase();var aF=L(aG).position();var aK=window.getComputedStyle?window.getComputedStyle(aG,""):aG.currentStyle;var aI=aJ+aF.left+parseInt(aK.marginLeft,10)+parseInt(aK.borderLeftWidth,10)+parseInt(aK.paddingLeft,10);var aL=aE+aF.top+parseInt(aK.marginTop,10)+parseInt(aK.borderTopWidth,10)+parseInt(aK.paddingTop,10);var aM=an.width;if((aN=="div"||aN=="span")&&!L(aG).hasClass("jqplot-highlighter-tooltip")){L(aG).children().each(function(){aw(this,aI,aL)});var aO=L(aG).jqplotChildText();if(aO){ak.font=L(aG).jqplotGetComputedFontStyle();ak.fillStyle=L(aG).css("color");aD(aG,ak,aO,aI,aL,aM)}}else{if(aN==="table"&&L(aG).hasClass("jqplot-table-legend")){ak.strokeStyle=L(aG).css("border-top-color");ak.fillStyle=L(aG).css("background-color");ak.fillRect(aI,aL,L(aG).innerWidth(),L(aG).innerHeight());if(parseInt(L(aG).css("border-top-width"),10)>0){ak.strokeRect(aI,aL,L(aG).innerWidth(),L(aG).innerHeight())}L(aG).find("div.jqplot-table-legend-swatch-outline").each(function(){var aU=L(this);ak.strokeStyle=aU.css("border-top-color");var aQ=aI+aU.position().left;var aR=aL+aU.position().top;ak.strokeRect(aQ,aR,aU.innerWidth(),aU.innerHeight());aQ+=parseInt(aU.css("padding-left"),10);aR+=parseInt(aU.css("padding-top"),10);var aT=aU.innerHeight()-2*parseInt(aU.css("padding-top"),10);var aP=aU.innerWidth()-2*parseInt(aU.css("padding-left"),10);var aS=aU.children("div.jqplot-table-legend-swatch");ak.fillStyle=aS.css("background-color");ak.fillRect(aQ,aR,aP,aT)});L(aG).find("td.jqplot-table-legend-label").each(function(){var aR=L(this);var aP=aI+aR.position().left;var aQ=aL+aR.position().top+parseInt(aR.css("padding-top"),10);ak.font=aR.jqplotGetComputedFontStyle();ak.fillStyle=aR.css("color");aD(aR,ak,aR.text(),aP,aQ,aM)});var aH=null}else{if(aN=="canvas"){ak.drawImage(aG,aI,aL)}}}}L(this).children().each(function(){aw(this,av,ax)});return an};L.fn.jqplotToImageStr=function(ai){var ah=L(this).jqplotToImageCanvas(ai);if(ah){return ah.toDataURL("image/png")}else{return null}};L.fn.jqplotToImageElem=function(ah){var ai=document.createElement("img");var aj=L(this).jqplotToImageStr(ah);ai.src=aj;return ai};L.fn.jqplotToImageElemStr=function(ah){var ai="<img src="+L(this).jqplotToImageStr(ah)+" />";return ai};L.fn.jqplotSaveImage=function(){var ah=L(this).jqplotToImageStr({});if(ah){window.location.href=ah.replace("image/png","image/octet-stream")}};L.fn.jqplotViewImage=function(){var ai=L(this).jqplotToImageElemStr({});var aj=L(this).jqplotToImageStr({});if(ai){var ah=window.open("");ah.document.open("image/png");ah.document.write(ai);ah.document.close();ah=null}};var ag=function(){this.syntax=ag.config.syntax;this._type="jsDate";this.proxy=new Date();this.options={};this.locale=ag.regional.getLocale();this.formatString="";this.defaultCentury=ag.config.defaultCentury;switch(arguments.length){case 0:break;case 1:if(l(arguments[0])=="[object Object]"&&arguments[0]._type!="jsDate"){var aj=this.options=arguments[0];this.syntax=aj.syntax||this.syntax;this.defaultCentury=aj.defaultCentury||this.defaultCentury;this.proxy=ag.createDate(aj.date)}else{this.proxy=ag.createDate(arguments[0])}break;default:var ah=[];for(var ai=0;ai<arguments.length;ai++){ah.push(arguments[ai])}this.proxy=new Date();this.proxy.setFullYear.apply(this.proxy,ah.slice(0,3));if(ah.slice(3).length){this.proxy.setHours.apply(this.proxy,ah.slice(3))}break}};ag.config={defaultLocale:"en",syntax:"perl",defaultCentury:1900};ag.prototype.add=function(aj,ai){var ah=E[ai]||E.day;if(typeof ah=="number"){this.proxy.setTime(this.proxy.getTime()+(ah*aj))}else{ah.add(this,aj)}return this};ag.prototype.clone=function(){return new ag(this.proxy.getTime())};ag.prototype.getUtcOffset=function(){return this.proxy.getTimezoneOffset()*60000};ag.prototype.diff=function(ai,al,ah){ai=new ag(ai);if(ai===null){return null}var aj=E[al]||E.day;if(typeof aj=="number"){var ak=(this.proxy.getTime()-ai.proxy.getTime())/aj}else{var ak=aj.diff(this.proxy,ai.proxy)}return(ah?ak:Math[ak>0?"floor":"ceil"](ak))};ag.prototype.getAbbrDayName=function(){return ag.regional[this.locale]["dayNamesShort"][this.proxy.getDay()]};ag.prototype.getAbbrMonthName=function(){return ag.regional[this.locale]["monthNamesShort"][this.proxy.getMonth()]};ag.prototype.getAMPM=function(){return this.proxy.getHours()>=12?"PM":"AM"};ag.prototype.getAmPm=function(){return this.proxy.getHours()>=12?"pm":"am"};ag.prototype.getCentury=function(){return parseInt(this.proxy.getFullYear()/100,10)};ag.prototype.getDate=function(){return this.proxy.getDate()};ag.prototype.getDay=function(){return this.proxy.getDay()};ag.prototype.getDayOfWeek=function(){var ah=this.proxy.getDay();return ah===0?7:ah};ag.prototype.getDayOfYear=function(){var ai=this.proxy;var ah=ai-new Date(""+ai.getFullYear()+"/1/1 GMT");ah+=ai.getTimezoneOffset()*60000;ai=null;return parseInt(ah/60000/60/24,10)+1};ag.prototype.getDayName=function(){return ag.regional[this.locale]["dayNames"][this.proxy.getDay()]};ag.prototype.getFullWeekOfYear=function(){var ak=this.proxy;var ah=this.getDayOfYear();var aj=6-ak.getDay();var ai=parseInt((ah+aj)/7,10);return ai};ag.prototype.getFullYear=function(){return this.proxy.getFullYear()};ag.prototype.getGmtOffset=function(){var ah=this.proxy.getTimezoneOffset()/60;var ai=ah<0?"+":"-";ah=Math.abs(ah);return ai+N(Math.floor(ah),2)+":"+N((ah%1)*60,2)};ag.prototype.getHours=function(){return this.proxy.getHours()};ag.prototype.getHours12=function(){var ah=this.proxy.getHours();return ah>12?ah-12:(ah==0?12:ah)};ag.prototype.getIsoWeek=function(){var ak=this.proxy;var aj=this.getWeekOfYear();var ah=(new Date(""+ak.getFullYear()+"/1/1")).getDay();var ai=aj+(ah>4||ah<=1?0:1);if(ai==53&&(new Date(""+ak.getFullYear()+"/12/31")).getDay()<4){ai=1}else{if(ai===0){ak=new ag(new Date(""+(ak.getFullYear()-1)+"/12/31"));ai=ak.getIsoWeek()}}ak=null;return ai};ag.prototype.getMilliseconds=function(){return this.proxy.getMilliseconds()};ag.prototype.getMinutes=function(){return this.proxy.getMinutes()};ag.prototype.getMonth=function(){return this.proxy.getMonth()};ag.prototype.getMonthName=function(){return ag.regional[this.locale]["monthNames"][this.proxy.getMonth()]};ag.prototype.getMonthNumber=function(){return this.proxy.getMonth()+1};ag.prototype.getSeconds=function(){return this.proxy.getSeconds()};ag.prototype.getShortYear=function(){return this.proxy.getYear()%100};ag.prototype.getTime=function(){return this.proxy.getTime()};ag.prototype.getTimezoneAbbr=function(){return this.proxy.toString().replace(/^.*\(([^)]+)\)$/,"$1")};ag.prototype.getTimezoneName=function(){var ah=/(?:\((.+)\)$| ([A-Z]{3}) )/.exec(this.toString());return ah[1]||ah[2]||"GMT"+this.getGmtOffset()};ag.prototype.getTimezoneOffset=function(){return this.proxy.getTimezoneOffset()};ag.prototype.getWeekOfYear=function(){var ah=this.getDayOfYear();var aj=7-this.getDayOfWeek();var ai=parseInt((ah+aj)/7,10);return ai};ag.prototype.getUnix=function(){return Math.round(this.proxy.getTime()/1000,0)};ag.prototype.getYear=function(){return this.proxy.getYear()};ag.prototype.next=function(ah){ah=ah||"day";return this.clone().add(1,ah)};ag.prototype.set=function(){switch(arguments.length){case 0:this.proxy=new Date();break;case 1:if(l(arguments[0])=="[object Object]"&&arguments[0]._type!="jsDate"){var aj=this.options=arguments[0];this.syntax=aj.syntax||this.syntax;this.defaultCentury=aj.defaultCentury||this.defaultCentury;this.proxy=ag.createDate(aj.date)}else{this.proxy=ag.createDate(arguments[0])}break;default:var ah=[];for(var ai=0;ai<arguments.length;ai++){ah.push(arguments[ai])}this.proxy=new Date();this.proxy.setFullYear.apply(this.proxy,ah.slice(0,3));if(ah.slice(3).length){this.proxy.setHours.apply(this.proxy,ah.slice(3))}break}return this};ag.prototype.setDate=function(ah){this.proxy.setDate(ah);return this};ag.prototype.setFullYear=function(){this.proxy.setFullYear.apply(this.proxy,arguments);return this};ag.prototype.setHours=function(){this.proxy.setHours.apply(this.proxy,arguments);return this};ag.prototype.setMilliseconds=function(ah){this.proxy.setMilliseconds(ah);return this};ag.prototype.setMinutes=function(){this.proxy.setMinutes.apply(this.proxy,arguments);return this};ag.prototype.setMonth=function(){this.proxy.setMonth.apply(this.proxy,arguments);return this};ag.prototype.setSeconds=function(){this.proxy.setSeconds.apply(this.proxy,arguments);return this};ag.prototype.setTime=function(ah){this.proxy.setTime(ah);return this};ag.prototype.setYear=function(){this.proxy.setYear.apply(this.proxy,arguments);return this};ag.prototype.strftime=function(ah){ah=ah||this.formatString||ag.regional[this.locale]["formatString"];return ag.strftime(this,ah,this.syntax)};ag.prototype.toString=function(){return this.proxy.toString()};ag.prototype.toYmdInt=function(){return(this.proxy.getFullYear()*10000)+(this.getMonthNumber()*100)+this.proxy.getDate()};ag.regional={en:{monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],formatString:"%Y-%m-%d %H:%M:%S"},fr:{monthNames:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],monthNamesShort:["Jan","Fév","Mar","Avr","Mai","Jun","Jul","Aoû","Sep","Oct","Nov","Déc"],dayNames:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],dayNamesShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],formatString:"%Y-%m-%d %H:%M:%S"},de:{monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],formatString:"%Y-%m-%d %H:%M:%S"},es:{monthNames:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthNamesShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],dayNames:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],dayNamesShort:["Dom","Lun","Mar","Mié","Juv","Vie","Sáb"],formatString:"%Y-%m-%d %H:%M:%S"},ru:{monthNames:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthNamesShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],dayNames:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],dayNamesShort:["вск","пнд","втр","срд","чтв","птн","сбт"],formatString:"%Y-%m-%d %H:%M:%S"},ar:{monthNames:["كانون الثاني","شباط","آذار","نيسان","آذار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول"],monthNamesShort:["1","2","3","4","5","6","7","8","9","10","11","12"],dayNames:["السبت","الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة"],dayNamesShort:["سبت","أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة"],formatString:"%Y-%m-%d %H:%M:%S"},pt:{monthNames:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthNamesShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],dayNames:["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado"],dayNamesShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],formatString:"%Y-%m-%d %H:%M:%S"},"pt-BR":{monthNames:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthNamesShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],dayNames:["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado"],dayNamesShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],formatString:"%Y-%m-%d %H:%M:%S"},pl:{monthNames:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],monthNamesShort:["Sty","Lut","Mar","Kwi","Maj","Cze","Lip","Sie","Wrz","Paź","Lis","Gru"],dayNames:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"],dayNamesShort:["Ni","Pn","Wt","Śr","Cz","Pt","Sb"],formatString:"%Y-%m-%d %H:%M:%S"},nl:{monthNames:["Januari","Februari","Maart","April","Mei","Juni","July","Augustus","September","Oktober","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],dayNames:","["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag"],dayNamesShort:["Zo","Ma","Di","Wo","Do","Vr","Za"],formatString:"%Y-%m-%d %H:%M:%S"},sv:{monthNames:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"],monthNamesShort:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],dayNames:["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"],dayNamesShort:["sön","mån","tis","ons","tor","fre","lör"],formatString:"%Y-%m-%d %H:%M:%S"}};ag.regional["en-US"]=ag.regional["en-GB"]=ag.regional.en;ag.regional.getLocale=function(){var ah=ag.config.defaultLocale;if(document&&document.getElementsByTagName("html")&&document.getElementsByTagName("html")[0].lang){ah=document.getElementsByTagName("html")[0].lang;if(!ag.regional.hasOwnProperty(ah)){ah=ag.config.defaultLocale}}return ah};var C=24*60*60*1000;var N=function(ah,ak){ah=String(ah);var ai=ak-ah.length;var aj=String(Math.pow(10,ai)).slice(1);return aj.concat(ah)};var E={millisecond:1,second:1000,minute:60*1000,hour:60*60*1000,day:C,week:7*C,month:{add:function(aj,ah){E.year.add(aj,Math[ah>0?"floor":"ceil"](ah/12));var ai=aj.getMonth()+(ah%12);if(ai==12){ai=0;aj.setYear(aj.getFullYear()+1)}else{if(ai==-1){ai=11;aj.setYear(aj.getFullYear()-1)}}aj.setMonth(ai)},diff:function(al,aj){var ah=al.getFullYear()-aj.getFullYear();var ai=al.getMonth()-aj.getMonth()+(ah*12);var ak=al.getDate()-aj.getDate();return ai+(ak/30)}},year:{add:function(ai,ah){ai.setYear(ai.getFullYear()+Math[ah>0?"floor":"ceil"](ah))},diff:function(ai,ah){return E.month.diff(ai,ah)/12}}};for(var Y in E){if(Y.substring(Y.length-1)!="s"){E[Y+"s"]=E[Y]}}var H=function(al,ak,ai){if(ag.formats[ai]["shortcuts"][ak]){return ag.strftime(al,ag.formats[ai]["shortcuts"][ak],ai)}else{var ah=(ag.formats[ai]["codes"][ak]||"").split(".");var aj=al["get"+ah[0]]?al["get"+ah[0]]():"";if(ah[1]){aj=N(aj,ah[1])}return aj}};ag.strftime=function(an,ak,aj,ao){var ai="perl";var am=ag.regional.getLocale();if(aj&&ag.formats.hasOwnProperty(aj)){ai=aj}else{if(aj&&ag.regional.hasOwnProperty(aj)){am=aj}}if(ao&&ag.formats.hasOwnProperty(ao)){ai=ao}else{if(ao&&ag.regional.hasOwnProperty(ao)){am=ao}}if(l(an)!="[object Object]"||an._type!="jsDate"){an=new ag(an);an.locale=am}if(!ak){ak=an.formatString||ag.regional[am]["formatString"]}var ah=ak||"%Y-%m-%d",ap="",al;while(ah.length>0){if(al=ah.match(ag.formats[ai].codes.matcher)){ap+=ah.slice(0,al.index);ap+=(al[1]||"")+H(an,al[2],ai);ah=ah.slice(al.index+al[0].length)}else{ap+=ah;ah=""}}return ap};ag.formats={ISO:"%Y-%m-%dT%H:%M:%S.%N%G",SQL:"%Y-%m-%d %H:%M:%S"};ag.formats.perl={codes:{matcher:/()%(#?(%|[a-z]))/i,Y:"FullYear",y:"ShortYear.2",m:"MonthNumber.2","#m":"MonthNumber",B:"MonthName",b:"AbbrMonthName",d:"Date.2","#d":"Date",e:"Date",A:"DayName",a:"AbbrDayName",w:"Day",H:"Hours.2","#H":"Hours",I:"Hours12.2","#I":"Hours12",p:"AMPM",M:"Minutes.2","#M":"Minutes",S:"Seconds.2","#S":"Seconds",s:"Unix",N:"Milliseconds.3","#N":"Milliseconds",O:"TimezoneOffset",Z:"TimezoneName",G:"GmtOffset"},shortcuts:{F:"%Y-%m-%d",T:"%H:%M:%S",X:"%H:%M:%S",x:"%m/%d/%y",D:"%m/%d/%y","#c":"%a %b %e %H:%M:%S %Y",v:"%e-%b-%Y",R:"%H:%M",r:"%I:%M:%S %p",t:"\t",n:"\n","%":"%"}};ag.formats.php={codes:{matcher:/()%((%|[a-z]))/i,a:"AbbrDayName",A:"DayName",d:"Date.2",e:"Date",j:"DayOfYear.3",u:"DayOfWeek",w:"Day",U:"FullWeekOfYear.2",V:"IsoWeek.2",W:"WeekOfYear.2",b:"AbbrMonthName",B:"MonthName",m:"MonthNumber.2",h:"AbbrMonthName",C:"Century.2",y:"ShortYear.2",Y:"FullYear",H:"Hours.2",I:"Hours12.2",l:"Hours12",p:"AMPM",P:"AmPm",M:"Minutes.2",S:"Seconds.2",s:"Unix",O:"TimezoneOffset",z:"GmtOffset",Z:"TimezoneAbbr"},shortcuts:{D:"%m/%d/%y",F:"%Y-%m-%d",T:"%H:%M:%S",X:"%H:%M:%S",x:"%m/%d/%y",R:"%H:%M",r:"%I:%M:%S %p",t:"\t",n:"\n","%":"%"}};ag.createDate=function(aj){if(aj==null){return new Date()}if(aj instanceof Date){return aj}if(typeof aj=="number"){return new Date(aj)}var ao=String(aj).replace(/^\s*(.+)\s*$/g,"$1");ao=ao.replace(/^([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,4})/,"$1/$2/$3");ao=ao.replace(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{4})/i,"$1 $2 $3");var an=ao.match(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{2})\D*/i);if(an&&an.length>3){var at=parseFloat(an[3]);var am=ag.config.defaultCentury+at;am=String(am);ao=ao.replace(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{2})\D*/i,an[1]+" "+an[2]+" "+am)}an=ao.match(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})[^0-9]/);function ar(ax,aw){var aC=parseFloat(aw[1]);var aB=parseFloat(aw[2]);var aA=parseFloat(aw[3]);var az=ag.config.defaultCentury;var av,au,aD,ay;if(aC>31){au=aA;aD=aB;av=az+aC}else{au=aB;aD=aC;av=az+aA}ay=aD+"/"+au+"/"+av;return ax.replace(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})/,ay)}if(an&&an.length>3){ao=ar(ao,an)}var an=ao.match(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})$/);if(an&&an.length>3){ao=ar(ao,an)}var al=0;var ai=ag.matchers.length;var aq,ah,ap=ao,ak;while(al<ai){ah=Date.parse(ap);if(!isNaN(ah)){return new Date(ah)}aq=ag.matchers[al];if(typeof aq=="function"){ak=aq.call(ag,ap);if(ak instanceof Date){return ak}}else{ap=ao.replace(aq[0],aq[1])}al++}return NaN};ag.daysInMonth=function(ah,ai){if(ai==2){return new Date(ah,1,29).getDate()==29?29:28}return[u,31,u,31,30,31,30,31,31,30,31,30,31][ai]};ag.matchers=[[/(3[01]|[0-2]\d)\s*\.\s*(1[0-2]|0\d)\s*\.\s*([1-9]\d{3})/,"$2/$1/$3"],[/([1-9]\d{3})\s*-\s*(1[0-2]|0\d)\s*-\s*(3[01]|[0-2]\d)/,"$2/$3/$1"],function(ak){var ai=ak.match(/^(?:(.+)\s+)?([012]?\d)(?:\s*\:\s*(\d\d))?(?:\s*\:\s*(\d\d(\.\d*)?))?\s*(am|pm)?\s*$/i);if(ai){if(ai[1]){var aj=this.createDate(ai[1]);if(isNaN(aj)){return}}else{var aj=new Date();aj.setMilliseconds(0)}var ah=parseFloat(ai[2]);if(ai[6]){ah=ai[6].toLowerCase()=="am"?(ah==12?0:ah):(ah==12?12:ah+12)}aj.setHours(ah,parseInt(ai[3]||0,10),parseInt(ai[4]||0,10),((parseFloat(ai[5]||0))||0)*1000);return aj}else{return ak}},function(ak){var ai=ak.match(/^(?:(.+))[T|\s+]([012]\d)(?:\:(\d\d))(?:\:(\d\d))(?:\.\d+)([\+\-]\d\d\:\d\d)$/i);if(ai){if(ai[1]){var aj=this.createDate(ai[1]);if(isNaN(aj)){return}}else{var aj=new Date();aj.setMilliseconds(0)}var ah=parseFloat(ai[2]);aj.setHours(ah,parseInt(ai[3],10),parseInt(ai[4],10),parseFloat(ai[5])*1000);return aj}else{return ak}},function(al){var aj=al.match(/^([0-3]?\d)\s*[-\/.\s]{1}\s*([a-zA-Z]{3,9})\s*[-\/.\s]{1}\s*([0-3]?\d)$/);if(aj){var ak=new Date();var am=ag.config.defaultCentury;var ao=parseFloat(aj[1]);var an=parseFloat(aj[3]);var ai,ah,ap;if(ao>31){ah=an;ai=am+ao}else{ah=ao;ai=am+an}var ap=ab(aj[2],ag.regional[ag.regional.getLocale()]["monthNamesShort"]);if(ap==-1){ap=ab(aj[2],ag.regional[ag.regional.getLocale()]["monthNames"])}ak.setFullYear(ai,ap,ah);ak.setHours(0,0,0,0);return ak}else{return al}}];function ab(aj,ak){if(ak.indexOf){return ak.indexOf(aj)}for(var ah=0,ai=ak.length;ah<ai;ah++){if(ak[ah]===aj){return ah}}return -1}function l(ah){if(ah===null){return"[object Null]"}return Object.prototype.toString.call(ah)}L.jsDate=ag;L.jqplot.sprintf=function(){function an(au,ap,aq,at){var ar=(au.length>=ap)?"":Array(1+ap-au.length>>>0).join(aq);return at?au+ar:ar+au}function ak(ar){var aq=new String(ar);for(var ap=10;ap>0;ap--){if(aq==(aq=aq.replace(/^(\d+)(\d{3})/,"$1"+L.jqplot.sprintf.thousandsSeparator+"$2"))){break}}return aq}function aj(av,au,ax,ar,at,aq){var aw=ar-av.length;if(aw>0){var ap=" ";if(aq){ap=" "}if(ax||!at){av=an(av,ar,ap,ax)}else{av=av.slice(0,au.length)+an("",aw,"0",true)+av.slice(au.length)}}return av}function ao(ay,aq,aw,ar,ap,av,ax,au){var at=ay>>>0;aw=aw&&at&&{"2":"0b","8":"0","16":"0x"}[aq]||"";ay=aw+an(at.toString(aq),av||0,"0",false);return aj(ay,aw,ar,ap,ax,au)}function ah(au,av,ar,ap,at,aq){if(ap!=null){au=au.slice(0,ap)}return aj(au,"",av,ar,at,aq)}var ai=arguments,al=0,am=ai[al++];return am.replace(L.jqplot.sprintf.regex,function(aM,ax,ay,aB,aO,aJ,av){if(aM=="%%"){return"%"}var aD=false,az="",aA=false,aL=false,aw=false,au=false;for(var aI=0;ay&&aI<ay.length;aI++){switch(ay.charAt(aI)){case" ":az=" ";break;case"+":az="+";break;case"-":aD=true;break;case"0":aA=true;break;case"#":aL=true;break;case"&":aw=true;break;case"'":au=true;break}}if(!aB){aB=0}else{if(aB=="*"){aB=+ai[al++]}else{if(aB.charAt(0)=="*"){aB=+ai[aB.slice(1,-1)]}else{aB=+aB}}}if(aB<0){aB=-aB;aD=true}if(!isFinite(aB)){throw new Error("$.jqplot.sprintf: (minimum-)width must be finite")}if(!aJ){aJ="fFeE".indexOf(av)>-1?6:(av=="d")?0:void (0)}else{if(aJ=="*"){aJ=+ai[al++]}else{if(aJ.charAt(0)=="*"){aJ=+ai[aJ.slice(1,-1)]}else{aJ=+aJ}}}var aF=ax?ai[ax.slice(0,-1)]:ai[al++];switch(av){case"s":if(aF==null){return""}return ah(String(aF),aD,aB,aJ,aA,aw);case"c":return ah(String.fromCharCode(+aF),aD,aB,aJ,aA,aw);case"b":return ao(aF,2,aL,aD,aB,aJ,aA,aw);case"o":return ao(aF,8,aL,aD,aB,aJ,aA,aw);case"x":return ao(aF,16,aL,aD,aB,aJ,aA,aw);case"X":return ao(aF,16,aL,aD,aB,aJ,aA,aw).toUpperCase();case"u":return ao(aF,10,aL,aD,aB,aJ,aA,aw);case"i":var ar=parseInt(+aF,10);if(isNaN(ar)){return""}var aH=ar<0?"-":az;var aK=au?ak(String(Math.abs(ar))):String(Math.abs(ar));aF=aH+an(aK,aJ,"0",false);return aj(aF,aH,aD,aB,aA,aw);case"d":var ar=Math.round(+aF);if(isNaN(ar)){return""}var aH=ar<0?"-":az;var aK=au?ak(String(Math.abs(ar))):String(Math.abs(ar));aF=aH+an(aK,aJ,"0",false);return aj(aF,aH,aD,aB,aA,aw);case"e":case"E":case"f":case"F":case"g":case"G":var ar=+aF;if(isNaN(ar)){return""}var aH=ar<0?"-":az;var at=["toExponential","toFixed","toPrecision"]["efg".indexOf(av.toLowerCase())];var aN=["toString","toUpperCase"]["eEfFgG".indexOf(av)%2];var aK=Math.abs(ar)[at](aJ);var aE=aK.toString().split(".");aE[0]=au?ak(aE[0]):aE[0];aK=aE.join(L.jqplot.sprintf.decimalMark);aF=aH+aK;var aC=aj(aF,aH,aD,aB,aA,aw)[aN]();return aC;case"p":case"P":var ar=+aF;if(isNaN(ar)){return""}var aH=ar<0?"-":az;var aE=String(Number(Math.abs(ar)).toExponential()).split(/e|E/);var aq=(aE[0].indexOf(".")!=-1)?aE[0].length-1:String(ar).length;var aG=(aE[1]<0)?-aE[1]-1:0;if(Math.abs(ar)<1){if(aq+aG<=aJ){aF=aH+Math.abs(ar).toPrecision(aq)}else{if(aq<=aJ-1){aF=aH+Math.abs(ar).toExponential(aq-1)}else{aF=aH+Math.abs(ar).toExponential(aJ-1)}}}else{var ap=(aq<=aJ)?aq:aJ;aF=aH+Math.abs(ar).toPrecision(ap)}var aN=["toString","toUpperCase"]["pP".indexOf(av)%2];return aj(aF,aH,aD,aB,aA,aw)[aN]();case"n":return"";default:return aM}})};L.jqplot.sprintf.thousandsSeparator=",";L.jqplot.sprintf.decimalMark=".";L.jqplot.sprintf.regex=/%%|%(\d+\$)?([-+#0&\' ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([nAscboxXuidfegpEGP])/g;L.jqplot.getSignificantFigures=function(al){var an=String(Number(Math.abs(al)).toExponential()).split(/e|E/);var am=(an[0].indexOf(".")!=-1)?an[0].length-1:an[0].length;var ai=(an[1]<0)?-an[1]-1:0;var ah=parseInt(an[1],10);var aj=(ah+1>0)?ah+1:0;var ak=(am<=aj)?0:am-ah-1;return{significantDigits:am,digitsLeft:aj,digitsRight:ak,zeros:ai,exponent:ah}};L.jqplot.getPrecision=function(ah){return L.jqplot.getSignificantFigures(ah).digitsRight};var X=L.uiBackCompat!==false;L.jqplot.effects={effect:{}};var m="jqplot.storage.";L.extend(L.jqplot.effects,{version:"1.9pre",save:function(ai,aj){for(var ah=0;ah<aj.length;ah++){if(aj[ah]!==null){ai.data(m+aj[ah],ai[0].style[aj[ah]])}}},restore:function(ai,aj){for(var ah=0;ah<aj.length;ah++){if(aj[ah]!==null){ai.css(aj[ah],ai.data(m+aj[ah]))}}},setMode:function(ah,ai){if(ai==="toggle"){ai=ah.is(":hidden")?"show":"hide"}return ai},createWrapper:function(ai){if(ai.parent().is(".ui-effects-wrapper")){return ai.parent()}var aj={width:ai.outerWidth(true),height:ai.outerHeight(true),"float":ai.css("float")},al=L("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),ah={width:ai.width(),height:ai.height()},ak=document.activeElement;ai.wrap(al);if(ai[0]===ak||L.contains(ai[0],ak)){L(ak).focus()}al=ai.parent();if(ai.css("position")==="static"){al.css({position:"relative"});ai.css({position:"relative"})}else{L.extend(aj,{position:ai.css("position"),zIndex:ai.css("z-index")});L.each(["top","left","bottom","right"],function(am,an){aj[an]=ai.css(an);if(isNaN(parseInt(aj[an],10))){aj[an]="auto"}});ai.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}ai.css(ah);return al.css(aj).show()},removeWrapper:function(ah){var ai=document.activeElement;if(ah.parent().is(".ui-effects-wrapper")){ah.parent().replaceWith(ah);if(ah[0]===ai||L.contains(ah[0],ai)){L(ai).focus()}}return ah}});function j(ai,ah,aj,ak){if(L.isPlainObject(ai)){return ai}ai={effect:ai};if(ah===u){ah={}}if(L.isFunction(ah)){ak=ah;aj=null;ah={}}if(L.type(ah)==="number"||L.fx.speeds[ah]){ak=aj;aj=ah;ah={}}if(L.isFunction(aj)){ak=aj;aj=null}if(ah){L.extend(ai,ah)}aj=aj||ah.duration;ai.duration=L.fx.off?0:typeof aj==="number"?aj:aj in L.fx.speeds?L.fx.speeds[aj]:L.fx.speeds._default;ai.complete=ak||ah.complete;return ai}function ae(ah){if(!ah||typeof ah==="number"||L.fx.speeds[ah]){return true}if(typeof ah==="string"&&!L.jqplot.effects.effect[ah]){if(X&&L.jqplot.effects[ah]){return false}return true}return false}L.fn.extend({jqplotEffect:function(ap,aq,ai,ao){var an=j.apply(this,arguments),ak=an.mode,al=an.queue,am=L.jqplot.effects.effect[an.effect],ah=!am&&X&&L.jqplot.effects[an.effect];if(L.fx.off||!(am||ah)){if(ak){return this[ak](an.duration,an.complete)}else{return this.each(function(){if(an.complete){an.complete.call(this)}})}}function aj(au){var av=L(this),at=an.complete,aw=an.mode;function ar(){if(L.isFunction(at)){at.call(av[0])}if(L.isFunction(au)){au()}}if(av.is(":hidden")?aw==="hide":aw==="show"){ar()}else{am.call(av[0],an,ar)}}if(am){return al===false?this.each(aj):this.queue(al||"fx",aj)}else{return ah.call(this,{options:an,duration:an.duration,callback:an.complete,mode:an.mode})}}});var a=/up|down|vertical/,v=/up|left|vertical|horizontal/;L.jqplot.effects.effect.blind=function(aj,ao){var ak=L(this),ar=["position","top","bottom","left","right","height","width"],ap=L.jqplot.effects.setMode(ak,aj.mode||"hide"),au=aj.direction||"up",am=a.test(au),al=am?"height":"width",aq=am?"top":"left",aw=v.test(au),an={},av=ap==="show",ai,ah,at;if(ak.parent().is(".ui-effects-wrapper")){L.jqplot.effects.save(ak.parent(),ar)}else{L.jqplot.effects.save(ak,ar)}ak.show();at=parseInt(ak.css("top"),10);ai=L.jqplot.effects.createWrapper(ak).css({overflow:"hidden"});ah=am?ai[al]()+at:ai[al]();an[al]=av?String(ah):"0";if(!aw){ak.css(am?"bottom":"right",0).css(am?"top":"left","").css({position:"absolute"});an[aq]=av?"0":String(ah)}if(av){ai.css(al,0);if(!aw){ai.css(aq,ah)}}ai.animate(an,{duration:aj.duration,easing:aj.easing,queue:false,complete:function(){if(ap==="hide"){ak.hide()}L.jqplot.effects.restore(ak,ar);L.jqplot.effects.removeWrapper(ak);ao()}})}})(jQuery);/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
  9    jsDate | (c) 2010-2013 Chris Leonello
 10  */(function(d){d.jqplot.BarRenderer=function(){d.jqplot.LineRenderer.call(this)};d.jqplot.BarRenderer.prototype=new d.jqplot.LineRenderer();d.jqplot.BarRenderer.prototype.constructor=d.jqplot.BarRenderer;d.jqplot.BarRenderer.prototype.init=function(o,q){this.barPadding=8;this.barMargin=10;this.barDirection="vertical";this.barWidth=null;this.shadowOffset=2;this.shadowDepth=5;this.shadowAlpha=0.08;this.waterfall=false;this.groups=1;this.varyBarColor=false;this.highlightMouseOver=true;this.highlightMouseDown=false;this.highlightColors=[];this.transposedData=true;this.renderer.animation={show:false,direction:"down",speed:3000,_supported:true};this._type="bar";if(o.highlightMouseDown&&o.highlightMouseOver==null){o.highlightMouseOver=false}d.extend(true,this,o);d.extend(true,this.renderer,o);this.fill=true;if(this.barDirection==="horizontal"&&this.rendererOptions.animation&&this.rendererOptions.animation.direction==null){this.renderer.animation.direction="left"}if(this.waterfall){this.fillToZero=false;this.disableStack=true}if(this.barDirection=="vertical"){this._primaryAxis="_xaxis";this._stackAxis="y";this.fillAxis="y"}else{this._primaryAxis="_yaxis";this._stackAxis="x";this.fillAxis="x"}this._highlightedPoint=null;this._plotSeriesInfo=null;this._dataColors=[];this._barPoints=[];var p={lineJoin:"miter",lineCap:"round",fill:true,isarc:false,strokeStyle:this.color,fillStyle:this.color,closePath:this.fill};this.renderer.shapeRenderer.init(p);var n={lineJoin:"miter",lineCap:"round",fill:true,isarc:false,angle:this.shadowAngle,offset:this.shadowOffset,alpha:this.shadowAlpha,depth:this.shadowDepth,closePath:this.fill};this.renderer.shadowRenderer.init(n);q.postInitHooks.addOnce(h);q.postDrawHooks.addOnce(j);q.eventListenerHooks.addOnce("jqplotMouseMove",b);q.eventListenerHooks.addOnce("jqplotMouseDown",a);q.eventListenerHooks.addOnce("jqplotMouseUp",l);q.eventListenerHooks.addOnce("jqplotClick",e);q.eventListenerHooks.addOnce("jqplotRightClick",m)};function g(t,p,o,w){if(this.rendererOptions.barDirection=="horizontal"){this._stackAxis="x";this._primaryAxis="_yaxis"}if(this.rendererOptions.waterfall==true){this._data=d.extend(true,[],this.data);var s=0;var u=(!this.rendererOptions.barDirection||this.rendererOptions.barDirection==="vertical"||this.transposedData===false)?1:0;for(var q=0;q<this.data.length;q++){s+=this.data[q][u];if(q>0){this.data[q][u]+=this.data[q-1][u]}}this.data[this.data.length]=(u==1)?[this.data.length+1,s]:[s,this.data.length+1];this._data[this._data.length]=(u==1)?[this._data.length+1,s]:[s,this._data.length+1]}if(this.rendererOptions.groups>1){this.breakOnNull=true;var n=this.data.length;var v=parseInt(n/this.rendererOptions.groups,10);var r=0;for(var q=v;q<n;q+=v){this.data.splice(q+r,0,[null,null]);this._plotData.splice(q+r,0,[null,null]);this._stackData.splice(q+r,0,[null,null]);r++}for(q=0;q<this.data.length;q++){if(this._primaryAxis=="_xaxis"){this.data[q][0]=q+1;this._plotData[q][0]=q+1;this._stackData[q][0]=q+1}else{this.data[q][1]=q+1;this._plotData[q][1]=q+1;this._stackData[q][1]=q+1}}}}d.jqplot.preSeriesInitHooks.push(g);d.jqplot.BarRenderer.prototype.calcSeriesNumbers=function(){var r=0;var t=0;var q=this[this._primaryAxis];var p,o,u;for(var n=0;n<q._series.length;n++){o=q._series[n];if(o===this){u=n}if(o.renderer.constructor==d.jqplot.BarRenderer){r+=o.data.length;t+=1}}return[r,t,u]};d.jqplot.BarRenderer.prototype.setBarWidth=function(){var q;var n=0;var o=0;var t=this[this._primaryAxis];var x,r,v;var w=this._plotSeriesInfo=this.renderer.calcSeriesNumbers.call(this);n=w[0];o=w[1];var u=t.numberTicks;var p=(u-1)/2;if(t.name=="xaxis"||t.name=="x2axis"){if(this._stack){this.barWidth=(t._offsets.max-t._offsets.min)/n*o-this.barMargin}else{this.barWidth=((t._offsets.max-t._offsets.min)/p-this.barPadding*(o-1)-this.barMargin*2)/o}}else{if(this._stack){this.barWidth=(t._offsets.min-t._offsets.max)/n*o-this.barMargin}else{this.barWidth=((t._offsets.min-t._offsets.max)/p-this.barPadding*(o-1)-this.barMargin*2)/o}}return[n,o]};function f(o){var q=[];for(var s=0;s<o.length;s++){var r=d.jqplot.getColorComponents(o[s]);var n=[r[0],r[1],r[2]];var t=n[0]+n[1]+n[2];for(var p=0;p<3;p++){n[p]=(t>570)?n[p]*0.8:n[p]+0.3*(255-n[p]);n[p]=parseInt(n[p],10)}q.push("rgb("+n[0]+","+n[1]+","+n[2]+")")}return q}function i(v,u,s,t,o){var q=v,w=v-1,n,p,r=(o==="x")?0:1;if(q>0){p=t.series[w]._plotData[u][r];if((s*p)<0){n=i(w,u,s,t,o)}else{n=t.series[w].gridData[u][r]}}else{n=(r===0)?t.series[q]._xaxis.series_u2p(0):t.series[q]._yaxis.series_u2p(0)}return n}d.jqplot.BarRenderer.prototype.draw=function(E,L,q,G){var I;var A=d.extend({},q);var w=(A.shadow!=undefined)?A.shadow:this.shadow;var O=(A.showLine!=undefined)?A.showLine:this.showLine;var F=(A.fill!=undefined)?A.fill:this.fill;var p=this.xaxis;var J=this.yaxis;var y=this._xaxis.series_u2p;var K=this._yaxis.series_u2p;var D,C;this._dataColors=[];this._barPoints=[];if(this.barWidth==null){this.renderer.setBarWidth.call(this)}var N=this._plotSeriesInfo=this.renderer.calcSeriesNumbers.call(this);var x=N[0];var v=N[1];var s=N[2];var H=[];if(this._stack){this._barNudge=0}else{this._barNudge=(-Math.abs(v/2-0.5)+s)*(this.barWidth+this.barPadding)}if(O){var u=new d.jqplot.ColorGenerator(this.negativeSeriesColors);var B=new d.jqplot.ColorGenerator(this.seriesColors);var M=u.get(this.index);if(!this.useNegativeColors){M=A.fillStyle}var t=A.fillStyle;var r;var P;var o;if(this.barDirection=="vertical"){for(var I=0;I<L.length;I++){if(!this._stack&&this.data[I][1]==null){continue}H=[];r=L[I][0]+this._barNudge;if(this._stack&&this._prevGridData.length){o=i(this.index,I,this._plotData[I][1],G,"y")}else{if(this.fillToZero){o=this._yaxis.series_u2p(0)}else{if(this.waterfall&&I>0&&I<this.gridData.length-1){o=this.gridData[I-1][1]}else{if(this.waterfall&&I==0&&I<this.gridData.length-1){if(this._yaxis.min<=0&&this._yaxis.max>=0){o=this._yaxis.series_u2p(0)}else{if(this._yaxis.min>0){o=E.canvas.height}else{o=0}}}else{if(this.waterfall&&I==this.gridData.length-1){if(this._yaxis.min<=0&&this._yaxis.max>=0){o=this._yaxis.series_u2p(0)}else{if(this._yaxis.min>0){o=E.canvas.height}else{o=0}}}else{o=E.canvas.height}}}}}if((this.fillToZero&&this._plotData[I][1]<0)||(this.waterfall&&this._data[I][1]<0)){if(this.varyBarColor&&!this._stack){if(this.useNegativeColors){A.fillStyle=u.next()}else{A.fillStyle=B.next()}}else{A.fillStyle=M}}else{if(this.varyBarColor&&!this._stack){A.fillStyle=B.next()}else{A.fillStyle=t}}if(!this.fillToZero||this._plotData[I][1]>=0){H.push([r-this.barWidth/2,o]);H.push([r-this.barWidth/2,L[I][1]]);H.push([r+this.barWidth/2,L[I][1]]);H.push([r+this.barWidth/2,o])}else{H.push([r-this.barWidth/2,L[I][1]]);H.push([r-this.barWidth/2,o]);H.push([r+this.barWidth/2,o]);H.push([r+this.barWidth/2,L[I][1]])}this._barPoints.push(H);if(w&&!this._stack){var z=d.extend(true,{},A);delete z.fillStyle;this.renderer.shadowRenderer.draw(E,H,z)}var n=A.fillStyle||this.color;this._dataColors.push(n);this.renderer.shapeRenderer.draw(E,H,A)}}else{if(this.barDirection=="horizontal"){for(var I=0;I<L.length;I++){if(!this._stack&&this.data[I][0]==null){continue}H=[];r=L[I][1]-this._barNudge;P;if(this._stack&&this._prevGridData.length){P=i(this.index,I,this._plotData[I][0],G,"x")}else{if(this.fillToZero){P=this._xaxis.series_u2p(0)}else{if(this.waterfall&&I>0&&I<this.gridData.length-1){P=this.gridData[I-1][0]}else{if(this.waterfall&&I==0&&I<this.gridData.length-1){if(this._xaxis.min<=0&&this._xaxis.max>=0){P=this._xaxis.series_u2p(0)}else{if(this._xaxis.min>0){P=0}else{P=0}}}else{if(this.waterfall&&I==this.gridData.length-1){if(this._xaxis.min<=0&&this._xaxis.max>=0){P=this._xaxis.series_u2p(0)}else{if(this._xaxis.min>0){P=0}else{P=E.canvas.width}}}else{P=0}}}}}if((this.fillToZero&&this._plotData[I][0]<0)||(this.waterfall&&this._data[I][0]<0)){if(this.varyBarColor&&!this._stack){if(this.useNegativeColors){A.fillStyle=u.next()}else{A.fillStyle=B.next()}}else{A.fillStyle=M}}else{if(this.varyBarColor&&!this._stack){A.fillStyle=B.next()}else{A.fillStyle=t}}if(!this.fillToZero||this._plotData[I][0]>=0){H.push([P,r+this.barWidth/2]);H.push([P,r-this.barWidth/2]);H.push([L[I][0],r-this.barWidth/2]);H.push([L[I][0],r+this.barWidth/2])}else{H.push([L[I][0],r+this.barWidth/2]);H.push([L[I][0],r-this.barWidth/2]);H.push([P,r-this.barWidth/2]);H.push([P,r+this.barWidth/2])}this._barPoints.push(H);if(w&&!this._stack){var z=d.extend(true,{},A);delete z.fillStyle;this.renderer.shadowRenderer.draw(E,H,z)}var n=A.fillStyle||this.color;this._dataColors.push(n);this.renderer.shapeRenderer.draw(E,H,A)}}}}if(this.highlightColors.length==0){this.highlightColors=d.jqplot.computeHighlightColors(this._dataColors)}else{if(typeof(this.highlightColors)=="string"){var N=this.highlightColors;this.highlightColors=[];for(var I=0;I<this._dataColors.length;I++){this.highlightColors.push(N)}}}};d.jqplot.BarRenderer.prototype.drawShadow=function(z,G,p,B){var D;var w=(p!=undefined)?p:{};var t=(w.shadow!=undefined)?w.shadow:this.shadow;var I=(w.showLine!=undefined)?w.showLine:this.showLine;var A=(w.fill!=undefined)?w.fill:this.fill;var o=this.xaxis;var E=this.yaxis;var v=this._xaxis.series_u2p;var F=this._yaxis.series_u2p;var y,C,x,u,s,r;if(this._stack&&this.shadow){if(this.barWidth==null){this.renderer.setBarWidth.call(this)}var H=this._plotSeriesInfo=this.renderer.calcSeriesNumbers.call(this);u=H[0];s=H[1];r=H[2];if(this._stack){this._barNudge=0}else{this._barNudge=(-Math.abs(s/2-0.5)+r)*(this.barWidth+this.barPadding)}if(I){if(this.barDirection=="vertical"){for(var D=0;D<G.length;D++){if(this.data[D][1]==null){continue}C=[];var q=G[D][0]+this._barNudge;var n;if(this._stack&&this._prevGridData.length){n=i(this.index,D,this._plotData[D][1],B,"y")}else{if(this.fillToZero){n=this._yaxis.series_u2p(0)}else{n=z.canvas.height}}C.push([q-this.barWidth/2,n]);C.push([q-this.barWidth/2,G[D][1]]);C.push([q+this.barWidth/2,G[D][1]]);C.push([q+this.barWidth/2,n]);this.renderer.shadowRenderer.draw(z,C,w)}}else{if(this.barDirection=="horizontal"){for(var D=0;D<G.length;D++){if(this.data[D][0]==null){continue}C=[];var q=G[D][1]-this._barNudge;var J;if(this._stack&&this._prevGridData.length){J=i(this.index,D,this._plotData[D][0],B,"x")}else{if(this.fillToZero){J=this._xaxis.series_u2p(0)}else{J=0}}C.push([J,q+this.barWidth/2]);C.push([G[D][0],q+this.barWidth/2]);C.push([G[D][0],q-this.barWidth/2]);C.push([J,q-this.barWidth/2]);this.renderer.shadowRenderer.draw(z,C,w)}}}}}};function h(q,p,n){for(var o=0;o<this.series.length;o++){if(this.series[o].renderer.constructor==d.jqplot.BarRenderer){if(this.series[o].highlightMouseOver){this.series[o].highlightMouseDown=false}}}}function j(){if(this.plugins.barRenderer&&this.plugins.barRenderer.highlightCanvas){this.plugins.barRenderer.highlightCanvas.resetCanvas();this.plugins.barRenderer.highlightCanvas=null}this.plugins.barRenderer={highlightedSeriesIndex:null};this.plugins.barRenderer.highlightCanvas=new d.jqplot.GenericCanvas();this.eventCanvas._elem.before(this.plugins.barRenderer.highlightCanvas.createElement(this._gridPadding,"jqplot-barRenderer-highlight-canvas",this._plotDimensions,this));this.plugins.barRenderer.highlightCanvas.setContext();this.eventCanvas._elem.bind("mouseleave",{plot:this},function(n){k(n.data.plot)})}function c(u,t,q,p){var o=u.series[t];var n=u.plugins.barRenderer.highlightCanvas;n._ctx.clearRect(0,0,n._ctx.canvas.width,n._ctx.canvas.height);o._highlightedPoint=q;u.plugins.barRenderer.highlightedSeriesIndex=t;var r={fillStyle:o.highlightColors[q]};o.renderer.shapeRenderer.draw(n._ctx,p,r);n=null}function k(p){var n=p.plugins.barRenderer.highlightCanvas;n._ctx.clearRect(0,0,n._ctx.canvas.width,n._ctx.canvas.height);for(var o=0;o<p.series.length;o++){p.series[o]._highlightedPoint=null}p.plugins.barRenderer.highlightedSeriesIndex=null;p.target.trigger("jqplotDataUnhighlight");n=null}function b(r,q,u,t,s){if(t){var p=[t.seriesIndex,t.pointIndex,t.data];var o=jQuery.Event("jqplotDataMouseOver");o.pageX=r.pageX;o.pageY=r.pageY;s.target.trigger(o,p);if(s.series[p[0]].show&&s.series[p[0]].highlightMouseOver&&!(p[0]==s.plugins.barRenderer.highlightedSeriesIndex&&p[1]==s.series[p[0]]._highlightedPoint)){var n=jQuery.Event("jqplotDataHighlight");n.which=r.which;n.pageX=r.pageX;n.pageY=r.pageY;s.target.trigger(n,p);c(s,t.seriesIndex,t.pointIndex,t.points)}}else{if(t==null){k(s)}}}function a(q,p,t,s,r){if(s){var o=[s.seriesIndex,s.pointIndex,s.data];if(r.series[o[0]].highlightMouseDown&&!(o[0]==r.plugins.barRenderer.highlightedSeriesIndex&&o[1]==r.series[o[0]]._highlightedPoint)){var n=jQuery.Event("jqplotDataHighlight");n.which=q.which;n.pageX=q.pageX;n.pageY=q.pageY;r.target.trigger(n,o);c(r,s.seriesIndex,s.pointIndex,s.points)}}else{if(s==null){k(r)}}}function l(p,o,s,r,q){var n=q.plugins.barRenderer.highlightedSeriesIndex;if(n!=null&&q.series[n].highlightMouseDown){k(q)}}function e(q,p,t,s,r){if(s){var o=[s.seriesIndex,s.pointIndex,s.data];var n=jQuery.Event("jqplotDataClick");n.which=q.which;n.pageX=q.pageX;n.pageY=q.pageY;r.target.trigger(n,o)}}function m(r,q,u,t,s){if(t){var p=[t.seriesIndex,t.pointIndex,t.data];var n=s.plugins.barRenderer.highlightedSeriesIndex;if(n!=null&&s.series[n].highlightMouseDown){k(s)}var o=jQuery.Event("jqplotDataRightClick");o.which=r.which;o.pageX=r.pageX;o.pageY=r.pageY;s.target.trigger(o,p)}}})(jQuery);/* jqPlot 1.0.8r1250 | (c) 2009-2013 Chris Leonello | jplot.com
 11    jsDate | (c) 2010-2013 Chris Leonello
 12  */(function(a){a.jqplot.CategoryAxisRenderer=function(b){a.jqplot.LinearAxisRenderer.call(this);this.sortMergedLabels=false};a.jqplot.CategoryAxisRenderer.prototype=new a.jqplot.LinearAxisRenderer();a.jqplot.CategoryAxisRenderer.prototype.constructor=a.jqplot.CategoryAxisRenderer;a.jqplot.CategoryAxisRenderer.prototype.init=function(e){this.groups=1;this.groupLabels=[];this._groupLabels=[];this._grouped=false;this._barsPerGroup=null;this.reverse=false;a.extend(true,this,{tickOptions:{formatString:"%d"}},e);var b=this._dataBounds;for(var f=0;f<this._series.length;f++){var g=this._series[f];if(g.groups){this.groups=g.groups}var h=g.data;for(var c=0;c<h.length;c++){if(this.name=="xaxis"||this.name=="x2axis"){if(h[c][0]<b.min||b.min==null){b.min=h[c][0]}if(h[c][0]>b.max||b.max==null){b.max=h[c][0]}}else{if(h[c][1]<b.min||b.min==null){b.min=h[c][1]}if(h[c][1]>b.max||b.max==null){b.max=h[c][1]}}}}if(this.groupLabels.length){this.groups=this.groupLabels.length}};a.jqplot.CategoryAxisRenderer.prototype.createTicks=function(){var D=this._ticks;var z=this.ticks;var F=this.name;var C=this._dataBounds;var v,A;var q,w;var d,c;var b,x;if(z.length){if(this.groups>1&&!this._grouped){var r=z.length;var p=parseInt(r/this.groups,10);var e=0;for(var x=p;x<r;x+=p){z.splice(x+e,0," ");e++}this._grouped=true}this.min=0.5;this.max=z.length+0.5;var m=this.max-this.min;this.numberTicks=2*z.length+1;for(x=0;x<z.length;x++){b=this.min+2*x*m/(this.numberTicks-1);var h=new this.tickRenderer(this.tickOptions);h.showLabel=false;h.setTick(b,this.name);this._ticks.push(h);var h=new this.tickRenderer(this.tickOptions);h.label=z[x];h.showMark=false;h.showGridline=false;h.setTick(b+0.5,this.name);this._ticks.push(h)}var h=new this.tickRenderer(this.tickOptions);h.showLabel=false;h.setTick(b+1,this.name);this._ticks.push(h)}else{if(F=="xaxis"||F=="x2axis"){v=this._plotDimensions.width}else{v=this._plotDimensions.height}if(this.min!=null&&this.max!=null&&this.numberTicks!=null){this.tickInterval=null}if(this.min!=null&&this.max!=null&&this.tickInterval!=null){if(parseInt((this.max-this.min)/this.tickInterval,10)!=(this.max-this.min)/this.tickInterval){this.tickInterval=null}}var y=[];var B=0;var q=0.5;var w,E;var f=false;for(var x=0;x<this._series.length;x++){var k=this._series[x];for(var u=0;u<k.data.length;u++){if(this.name=="xaxis"||this.name=="x2axis"){E=k.data[u][0]}else{E=k.data[u][1]}if(a.inArray(E,y)==-1){f=true;B+=1;y.push(E)}}}if(f&&this.sortMergedLabels){if(typeof y[0]=="string"){y.sort()}else{y.sort(function(j,i){return j-i})}}this.ticks=y;for(var x=0;x<this._series.length;x++){var k=this._series[x];for(var u=0;u<k.data.length;u++){if(this.name=="xaxis"||this.name=="x2axis"){E=k.data[u][0]}else{E=k.data[u][1]}var n=a.inArray(E,y)+1;if(this.name=="xaxis"||this.name=="x2axis"){k.data[u][0]=n}else{k.data[u][1]=n}}}if(this.groups>1&&!this._grouped){var r=y.length;var p=parseInt(r/this.groups,10);var e=0;for(var x=p;x<r;x+=p+1){y[x]=" "}this._grouped=true}w=B+0.5;if(this.numberTicks==null){this.numberTicks=2*B+1}var m=w-q;this.min=q;this.max=w;var o=0;var g=parseInt(3+v/10,10);var p=parseInt(B/g,10);if(this.tickInterval==null){this.tickInterval=m/(this.numberTicks-1)}for(var x=0;x<this.numberTicks;x++){b=this.min+x*this.tickInterval;var h=new this.tickRenderer(this.tickOptions);if(x/2==parseInt(x/2,10)){h.showLabel=false;h.showMark=true}else{if(p>0&&o<p){h.showLabel=false;o+=1}else{h.showLabel=true;o=0}h.label=h.formatter(h.formatString,y[(x-1)/2]);h.showMark=false;h.showGridline=false}h.setTick(b,this.name);this._ticks.push(h)}}};a.jqplot.CategoryAxisRenderer.prototype.draw=function(b,j){if(this.show){this.renderer.createTicks.call(this);var h=0;var c;if(this._elem){this._elem.emptyForce()}this._elem=this._elem||a('<div class="jqplot-axis jqplot-'+this.name+'" style="position:absolute;"></div>');if(this.name=="xaxis"||this.name=="x2axis"){this._elem.width(this._plotDimensions.width)}else{this._elem.height(this._plotDimensions.height)}this.labelOptions.axis=this.name;this._label=new this.labelRenderer(this.labelOptions);if(this._label.show){var g=this._label.draw(b,j);g.appendTo(this._elem)}var f=this._ticks;for(var e=0;e<f.length;e++){var d=f[e];if(d.showLabel&&(!d.isMinorTick||this.showMinorTicks)){var g=d.draw(b,j);g.appendTo(this._elem)}}this._groupLabels=[];for(var e=0;e<this.groupLabels.length;e++){var g=a('<div style="position:absolute;" class="jqplot-'+this.name+'-groupLabel"></div>');g.html(this.groupLabels[e]);this._groupLabels.push(g);g.appendTo(this._elem)}}return this._elem};a.jqplot.CategoryAxisRenderer.prototype.set=function(){var e=0;var m;var k=0;var f=0;var d=(this._label==null)?false:this._label.show;if(this.show){var n=this._ticks;for(var c=0;c<n.length;c++){var g=n[c];if(g.showLabel&&(!g.isMinorTick||this.showMinorTicks)){if(this.name=="xaxis"||this.name=="x2axis"){m=g._elem.outerHeight(true)}else{m=g._elem.outerWidth(true)}if(m>e){e=m}}}var j=0;for(var c=0;c<this._groupLabels.length;c++){var b=this._groupLabels[c];if(this.name=="xaxis"||this.name=="x2axis"){m=b.outerHeight(true)}else{m=b.outerWidth(true)}if(m>j){j=m}}if(d){k=this._label._elem.outerWidth(true);f=this._label._elem.outerHeight(true)}if(this.name=="xaxis"){e+=j+f;this._elem.css({height:e+"px",left:"0px",bottom:"0px"})}else{if(this.name=="x2axis"){e+=j+f;this._elem.css({height:e+"px",left:"0px",top:"0px"})}else{if(this.name=="yaxis"){e+=j+k;this._elem.css({width:e+"px",left:"0px",top:"0px"});if(d&&this._label.constructor==a.jqplot.AxisLabelRenderer){this._label._elem.css("width",k+"px")}}else{e+=j+k;this._elem.css({width:e+"px",right:"0px",top:"0px"});if(d&&this._label.constructor==a.jqplot.AxisLabelRenderer){this._label._elem.css("width",k+"px")}}}}}};a.jqplot.CategoryAxisRenderer.prototype.pack=function(e,c){var C=this._ticks;var v=this.max;var s=this.min;var n=c.max;var l=c.min;var q=(this._label==null)?false:this._label.show;var x;for(var r in e){this._elem.css(r,e[r])}this._offsets=c;var g=n-l;var k=v-s;if(!this.reverse){this.u2p=function(h){return(h-s)*g/k+l};this.p2u=function(h){return(h-l)*k/g+s};if(this.name=="xaxis"||this.name=="x2axis"){this.series_u2p=function(h){return(h-s)*g/k};this.series_p2u=function(h){return h*k/g+s}}else{this.series_u2p=function(h){return(h-v)*g/k};this.series_p2u=function(h){return h*k/g+v}}}else{this.u2p=function(h){return l+(v-h)*g/k};this.p2u=function(h){return s+(h-l)*k/g};if(this.name=="xaxis"||this.name=="x2axis"){this.series_u2p=function(h){return(v-h)*g/k};this.series_p2u=function(h){return h*k/g+v}}else{this.series_u2p=function(h){return(s-h)*g/k};this.series_p2u=function(h){return h*k/g+s}}}if(this.show){if(this.name=="xaxis"||this.name=="x2axis"){for(x=0;x<C.length;x++){var o=C[x];if(o.show&&o.showLabel){var b;if(o.constructor==a.jqplot.CanvasAxisTickRenderer&&o.angle){var A=(this.name=="xaxis")?1:-1;switch(o.labelPosition){case"auto":if(A*o.angle<0){b=-o.getWidth()+o._textRenderer.height*Math.sin(-o._textRenderer.angle)/2}else{b=-o._textRenderer.height*Math.sin(o._textRenderer.angle)/2}break;case"end":b=-o.getWidth()+o._textRenderer.height*Math.sin(-o._textRenderer.angle)/2;break;case"start":b=-o._textRenderer.height*Math.sin(o._textRenderer.angle)/2;break;case"middle":b=-o.getWidth()/2+o._textRenderer.height*Math.sin(-o._textRenderer.angle)/2;break;default:b=-o.getWidth()/2+o._textRenderer.height*Math.sin(-o._textRenderer.angle)/2;break}}else{b=-o.getWidth()/2}var D=this.u2p(o.value)+b+"px";o._elem.css("left",D);o.pack()}}var z=["bottom",0];if(q){var m=this._label._elem.outerWidth(true);this._label._elem.css("left",l+g/2-m/2+"px");if(this.name=="xaxis"){this._label._elem.css("bottom","0px");z=["bottom",this._label._elem.outerHeight(true)]}else{this._label._elem.css("top","0px");z=["top",this._label._elem.outerHeight(true)]}this._label.pack()}var d=parseInt(this._ticks.length/this.groups,10)+1;for(x=0;x<this._groupLabels.length;x++){var B=0;var f=0;for(var u=x*d;u<(x+1)*d;u++){if(u>=this._ticks.length-1){continue}if(this._ticks[u]._elem&&this._ticks[u].label!=" "){var o=this._ticks[u]._elem;var r=o.position();B+=r.left+o.outerWidth(true)/2;f++}}B=B/f;this._groupLabels[x].css({left:(B-this._groupLabels[x].outerWidth(true)/2)});this._groupLabels[x].css(z[0],z[1])}}else{for(x=0;x<C.length;x++){var o=C[x];if(o.show&&o.showLabel){var b;if(o.constructor==a.jqplot.CanvasAxisTickRenderer&&o.angle){var A=(this.name=="yaxis")?1:-1;switch(o.labelPosition){case"auto":case"end":if(A*o.angle<0){b=-o._textRenderer.height*Math.cos(-o._textRenderer.angle)/2}else{b=-o.getHeight()+o._textRenderer.height*Math.cos(o._textRenderer.angle)/2}break;case"start":if(o.angle>0){b=-o._textRenderer.height*Math.cos(-o._textRenderer.angle)/2}else{b=-o.getHeight()+o._textRenderer.height*Math.cos(o._textRenderer.angle)/2}break;case"middle":b=-o.getHeight()/2;break;default:b=-o.getHeight()/2;break}}else{b=-o.getHeight()/2}var D=this.u2p(o.value)+b+"px";o._elem.css("top",D);o.pack()}}var z=["left",0];if(q){var y=this._label._elem.outerHeight(true);this._label._elem.css("top",n-g/2-y/2+"px");if(this.name=="yaxis"){this._label._elem.css("left","0px");z=["left",this._label._elem.outerWidth(true)]}else{this._label._elem.css("right","0px");z=["right",this._label._elem.outerWidth(true)]}this._label.pack()}var d=parseInt(this._ticks.length/this.groups,10)+1;for(x=0;x<this._groupLabels.length;x++){var B=0;var f=0;for(var u=x*d;u<(x+1)*d;u++){if(u>=this._ticks.length-1){continue}if(this._ticks[u]._elem&&this._ticks[u].label!=" "){var o=this._ticks[u]._elem;var r=o.position();B+=r.top+o.outerHeight()/2;f++}}B=B/f;this._groupLabels[x].css({top:B-this._groupLabels[x].outerHeight()/2});this._groupLabels[x].css(z[0],z[1])}}}}})(jQuery);(function(){function C(){var a="{}";if("userDataBehavior"==h){d.load("jStorage");try{a=d.getAttribute("jStorage")}catch(b){}try{r=d.getAttribute("jStorage_update")}catch(c){}g.jStorage=a}D();x();E()}function u(){var a;clearTimeout(F);F=setTimeout(function(){if("localStorage"==h||"globalStorage"==h)a=g.jStorage_update;else if("userDataBehavior"==h){d.load("jStorage");try{a=d.getAttribute("jStorage_update")}catch(b){}}if(a&&a!=r){r=a;var k=l.parse(l.stringify(c.__jstorage_meta.CRC32)),p;C();p=l.parse(l.stringify(c.__jstorage_meta.CRC32));
 13 var e,y=[],f=[];for(e in k)k.hasOwnProperty(e)&&(p[e]?k[e]!=p[e]&&"2."==String(k[e]).substr(0,2)&&y.push(e):f.push(e));for(e in p)p.hasOwnProperty(e)&&(k[e]||y.push(e));s(y,"updated");s(f,"deleted")}},25)}function s(a,b){a=[].concat(a||[]);if("flushed"==b){a=[];for(var c in j)j.hasOwnProperty(c)&&a.push(c);b="deleted"}c=0;for(var p=a.length;c<p;c++){if(j[a[c]])for(var e=0,d=j[a[c]].length;e<d;e++)j[a[c]][e](a[c],b);if(j["*"]){e=0;for(d=j["*"].length;e<d;e++)j["*"][e](a[c],b)}}}function v(){var a=
 14 (+new Date).toString();"localStorage"==h||"globalStorage"==h?g.jStorage_update=a:"userDataBehavior"==h&&(d.setAttribute("jStorage_update",a),d.save("jStorage"));u()}function D(){if(g.jStorage)try{c=l.parse(String(g.jStorage))}catch(a){g.jStorage="{}"}else g.jStorage="{}";z=g.jStorage?String(g.jStorage).length:0;c.__jstorage_meta||(c.__jstorage_meta={});c.__jstorage_meta.CRC32||(c.__jstorage_meta.CRC32={})}function w(){if(c.__jstorage_meta.PubSub){for(var a=+new Date-2E3,b=0,k=c.__jstorage_meta.PubSub.length;b<
 15 k;b++)if(c.__jstorage_meta.PubSub[b][0]<=a){c.__jstorage_meta.PubSub.splice(b,c.__jstorage_meta.PubSub.length-b);break}c.__jstorage_meta.PubSub.length||delete c.__jstorage_meta.PubSub}try{g.jStorage=l.stringify(c),d&&(d.setAttribute("jStorage",g.jStorage),d.save("jStorage")),z=g.jStorage?String(g.jStorage).length:0}catch(p){}}function q(a){if(!a||"string"!=typeof a&&"number"!=typeof a)throw new TypeError("Key name must be string or numeric");if("__jstorage_meta"==a)throw new TypeError("Reserved key name");
 16 return!0}function x(){var a,b,k,d,e=Infinity,g=!1,f=[];clearTimeout(G);if(c.__jstorage_meta&&"object"==typeof c.__jstorage_meta.TTL){a=+new Date;k=c.__jstorage_meta.TTL;d=c.__jstorage_meta.CRC32;for(b in k)k.hasOwnProperty(b)&&(k[b]<=a?(delete k[b],delete d[b],delete c[b],g=!0,f.push(b)):k[b]<e&&(e=k[b]));Infinity!=e&&(G=setTimeout(x,e-a));g&&(w(),v(),s(f,"deleted"))}}function E(){var a;if(c.__jstorage_meta.PubSub){var b,k=A;for(a=c.__jstorage_meta.PubSub.length-1;0<=a;a--)if(b=c.__jstorage_meta.PubSub[a],
 17 b[0]>A){var k=b[0],d=b[1];b=b[2];if(t[d])for(var e=0,g=t[d].length;e<g;e++)t[d][e](d,l.parse(l.stringify(b)))}A=k}}var n=window.jQuery||window.$||(window.$={}),l={parse:window.JSON&&(window.JSON.parse||window.JSON.decode)||String.prototype.evalJSON&&function(a){return String(a).evalJSON()}||n.parseJSON||n.evalJSON,stringify:Object.toJSON||window.JSON&&(window.JSON.stringify||window.JSON.encode)||n.toJSON};if(!l.parse||!l.stringify)throw Error("No JSON support found, include //cdnjs.cloudflare.com/ajax/libs/json2/20110223/json2.js to page");
 18 var c={__jstorage_meta:{CRC32:{}}},g={jStorage:"{}"},d=null,z=0,h=!1,j={},F=!1,r=0,t={},A=+new Date,G,B={isXML:function(a){return(a=(a?a.ownerDocument||a:0).documentElement)?"HTML"!==a.nodeName:!1},encode:function(a){if(!this.isXML(a))return!1;try{return(new XMLSerializer).serializeToString(a)}catch(b){try{return a.xml}catch(c){}}return!1},decode:function(a){var b="DOMParser"in window&&(new DOMParser).parseFromString||window.ActiveXObject&&function(a){var b=new ActiveXObject("Microsoft.XMLDOM");b.async=
 19 "false";b.loadXML(a);return b};if(!b)return!1;a=b.call("DOMParser"in window&&new DOMParser||window,a,"text/xml");return this.isXML(a)?a:!1}};n.jStorage={version:"0.4.3",set:function(a,b,d){q(a);d=d||{};if("undefined"==typeof b)return this.deleteKey(a),b;if(B.isXML(b))b={_is_xml:!0,xml:B.encode(b)};else{if("function"==typeof b)return;b&&"object"==typeof b&&(b=l.parse(l.stringify(b)))}c[a]=b;for(var g=c.__jstorage_meta.CRC32,e=l.stringify(b),j=e.length,f=2538058380^j,h=0,m;4<=j;)m=e.charCodeAt(h)&255|
 20 (e.charCodeAt(++h)&255)<<8|(e.charCodeAt(++h)&255)<<16|(e.charCodeAt(++h)&255)<<24,m=1540483477*(m&65535)+((1540483477*(m>>>16)&65535)<<16),m^=m>>>24,m=1540483477*(m&65535)+((1540483477*(m>>>16)&65535)<<16),f=1540483477*(f&65535)+((1540483477*(f>>>16)&65535)<<16)^m,j-=4,++h;switch(j){case 3:f^=(e.charCodeAt(h+2)&255)<<16;case 2:f^=(e.charCodeAt(h+1)&255)<<8;case 1:f^=e.charCodeAt(h)&255,f=1540483477*(f&65535)+((1540483477*(f>>>16)&65535)<<16)}f^=f>>>13;f=1540483477*(f&65535)+((1540483477*(f>>>16)&
 21 65535)<<16);g[a]="2."+((f^f>>>15)>>>0);this.setTTL(a,d.TTL||0);s(a,"updated");return b},get:function(a,b){q(a);return a in c?c[a]&&"object"==typeof c[a]&&c[a]._is_xml?B.decode(c[a].xml):c[a]:"undefined"==typeof b?null:b},deleteKey:function(a){q(a);return a in c?(delete c[a],"object"==typeof c.__jstorage_meta.TTL&&a in c.__jstorage_meta.TTL&&delete c.__jstorage_meta.TTL[a],delete c.__jstorage_meta.CRC32[a],w(),v(),s(a,"deleted"),!0):!1},setTTL:function(a,b){var d=+new Date;q(a);b=Number(b)||0;return a in
 22 c?(c.__jstorage_meta.TTL||(c.__jstorage_meta.TTL={}),0<b?c.__jstorage_meta.TTL[a]=d+b:delete c.__jstorage_meta.TTL[a],w(),x(),v(),!0):!1},getTTL:function(a){var b=+new Date;q(a);return a in c&&c.__jstorage_meta.TTL&&c.__jstorage_meta.TTL[a]?(a=c.__jstorage_meta.TTL[a]-b)||0:0},flush:function(){c={__jstorage_meta:{CRC32:{}}};w();v();s(null,"flushed");return!0},storageObj:function(){function a(){}a.prototype=c;return new a},index:function(){var a=[],b;for(b in c)c.hasOwnProperty(b)&&"__jstorage_meta"!=
 23 b&&a.push(b);return a},storageSize:function(){return z},currentBackend:function(){return h},storageAvailable:function(){return!!h},listenKeyChange:function(a,b){q(a);j[a]||(j[a]=[]);j[a].push(b)},stopListening:function(a,b){q(a);if(j[a])if(b)for(var c=j[a].length-1;0<=c;c--)j[a][c]==b&&j[a].splice(c,1);else delete j[a]},subscribe:function(a,b){a=(a||"").toString();if(!a)throw new TypeError("Channel not defined");t[a]||(t[a]=[]);t[a].push(b)},publish:function(a,b){a=(a||"").toString();if(!a)throw new TypeError("Channel not defined");
 24 c.__jstorage_meta||(c.__jstorage_meta={});c.__jstorage_meta.PubSub||(c.__jstorage_meta.PubSub=[]);c.__jstorage_meta.PubSub.unshift([+new Date,a,b]);w();v()},reInit:function(){C()}};a:{n=!1;if("localStorage"in window)try{window.localStorage.setItem("_tmptest","tmpval"),n=!0,window.localStorage.removeItem("_tmptest")}catch(H){}if(n)try{window.localStorage&&(g=window.localStorage,h="localStorage",r=g.jStorage_update)}catch(I){}else if("globalStorage"in window)try{window.globalStorage&&(g=window.globalStorage[window.location.hostname],
 25 h="globalStorage",r=g.jStorage_update)}catch(J){}else if(d=document.createElement("link"),d.addBehavior){d.style.behavior="url(#default#userData)";document.getElementsByTagName("head")[0].appendChild(d);try{d.load("jStorage")}catch(K){d.setAttribute("jStorage","{}"),d.save("jStorage"),d.load("jStorage")}n="{}";try{n=d.getAttribute("jStorage")}catch(L){}try{r=d.getAttribute("jStorage_update")}catch(M){}g.jStorage=n;h="userDataBehavior"}else{d=null;break a}D();x();"localStorage"==h||"globalStorage"==
 26 h?"addEventListener"in window?window.addEventListener("storage",u,!1):document.attachEvent("onstorage",u):"userDataBehavior"==h&&setInterval(u,1E3);E();"addEventListener"in window&&window.addEventListener("pageshow",function(a){a.persisted&&u()},!1)}})();
 27 /*
 28   html2canvas 0.4.1 <http://html2canvas.hertzen.com>
 29   Copyright (c) 2013 Niklas von Hertzen
 30 
 31   Released under MIT License
 32 */
 33 
 34 (function(window, document, undefined){
 35 
 36 "use strict";
 37 
 38 var _html2canvas = {},
 39 previousElement,
 40 computedCSS,
 41 html2canvas;
 42 
 43 _html2canvas.Util = {};
 44 
 45 _html2canvas.Util.log = function(a) {
 46   if (_html2canvas.logging && window.console && window.console.log) {
 47     window.console.log(a);
 48   }
 49 };
 50 
 51 _html2canvas.Util.trimText = (function(isNative){
 52   return function(input) {
 53     return isNative ? isNative.apply(input) : ((input || '') + '').replace( /^\s+|\s+$/g , '' );
 54   };
 55 })(String.prototype.trim);
 56 
 57 _html2canvas.Util.asFloat = function(v) {
 58   return parseFloat(v);
 59 };
 60 
 61 (function() {
 62   // TODO: support all possible length values
 63   var TEXT_SHADOW_PROPERTY = /((rgba|rgb)\([^\)]+\)(\s-?\d+px){0,})/g;
 64   var TEXT_SHADOW_VALUES = /(-?\d+px)|(#.+)|(rgb\(.+\))|(rgba\(.+\))/g;
 65   _html2canvas.Util.parseTextShadows = function (value) {
 66     if (!value || value === 'none') {
 67       return [];
 68     }
 69 
 70     // find multiple shadow declarations
 71     var shadows = value.match(TEXT_SHADOW_PROPERTY),
 72       results = [];
 73     for (var i = 0; shadows && (i < shadows.length); i++) {
 74       var s = shadows[i].match(TEXT_SHADOW_VALUES);
 75       results.push({
 76         color: s[0],
 77         offsetX: s[1] ? s[1].replace('px', '') : 0,
 78         offsetY: s[2] ? s[2].replace('px', '') : 0,
 79         blur: s[3] ? s[3].replace('px', '') : 0
 80       });
 81     }
 82     return results;
 83   };
 84 })();
 85 
 86 
 87 _html2canvas.Util.parseBackgroundImage = function (value) {
 88     var whitespace = ' \r\n\t',
 89         method, definition, prefix, prefix_i, block, results = [],
 90         c, mode = 0, numParen = 0, quote, args;
 91 
 92     var appendResult = function(){
 93         if(method) {
 94             if(definition.substr( 0, 1 ) === '"') {
 95                 definition = definition.substr( 1, definition.length - 2 );
 96             }
 97             if(definition) {
 98                 args.push(definition);
 99             }
100             if(method.substr( 0, 1 ) === '-' &&
101                     (prefix_i = method.indexOf( '-', 1 ) + 1) > 0) {
102                 prefix = method.substr( 0, prefix_i);
103                 method = method.substr( prefix_i );
104             }
105             results.push({
106                 prefix: prefix,
107                 method: method.toLowerCase(),
108                 value: block,
109                 args: args
110             });
111         }
112         args = []; //for some odd reason, setting .length = 0 didn't work in safari
113         method =
114             prefix =
115             definition =
116             block = '';
117     };
118 
119     appendResult();
120     for(var i = 0, ii = value.length; i<ii; i++) {
121         c = value[i];
122         if(mode === 0 && whitespace.indexOf( c ) > -1){
123             continue;
124         }
125         switch(c) {
126             case '"':
127                 if(!quote) {
128                     quote = c;
129                 }
130                 else if(quote === c) {
131                     quote = null;
132                 }
133                 break;
134 
135             case '(':
136                 if(quote) { break; }
137                 else if(mode === 0) {
138                     mode = 1;
139                     block += c;
140                     continue;
141                 } else {
142                     numParen++;
143                 }
144                 break;
145 
146             case ')':
147                 if(quote) { break; }
148                 else if(mode === 1) {
149                     if(numParen === 0) {
150                         mode = 0;
151                         block += c;
152                         appendResult();
153                         continue;
154                     } else {
155                         numParen--;
156                     }
157                 }
158                 break;
159 
160             case ',':
161                 if(quote) { break; }
162                 else if(mode === 0) {
163                     appendResult();
164                     continue;
165                 }
166                 else if (mode === 1) {
167                     if(numParen === 0 && !method.match(/^url$/i)) {
168                         args.push(definition);
169                         definition = '';
170                         block += c;
171                         continue;
172                     }
173                 }
174                 break;
175         }
176 
177         block += c;
178         if(mode === 0) { method += c; }
179         else { definition += c; }
180     }
181     appendResult();
182 
183     return results;
184 };
185 
186 _html2canvas.Util.Bounds = function (element) {
187   var clientRect, bounds = {};
188 
189   if (element.getBoundingClientRect){
190     clientRect = element.getBoundingClientRect();
191 
192     // TODO add scroll position to bounds, so no scrolling of window necessary
193     bounds.top = clientRect.top;
194     bounds.bottom = clientRect.bottom || (clientRect.top + clientRect.height);
195     bounds.left = clientRect.left;
196 
197     bounds.width = element.offsetWidth;
198     bounds.height = element.offsetHeight;
199   }
200 
201   return bounds;
202 };
203 
204 // TODO ideally, we'd want everything to go through this function instead of Util.Bounds,
205 // but would require further work to calculate the correct positions for elements with offsetParents
206 _html2canvas.Util.OffsetBounds = function (element) {
207   var parent = element.offsetParent ? _html2canvas.Util.OffsetBounds(element.offsetParent) : {top: 0, left: 0};
208 
209   return {
210     top: element.offsetTop + parent.top,
211     bottom: element.offsetTop + element.offsetHeight + parent.top,
212     left: element.offsetLeft + parent.left,
213     width: element.offsetWidth,
214     height: element.offsetHeight
215   };
216 };
217 
218 function toPX(element, attribute, value ) {
219     var rsLeft = element.runtimeStyle && element.runtimeStyle[attribute],
220         left,
221         style = element.style;
222 
223     // Check if we are not dealing with pixels, (Opera has issues with this)
224     // Ported from jQuery css.js
225     // From the awesome hack by Dean Edwards
226     // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
227 
228     // If we're not dealing with a regular pixel number
229     // but a number that has a weird ending, we need to convert it to pixels
230 
231     if ( !/^-?[0-9]+\.?[0-9]*(?:px)?$/i.test( value ) && /^-?\d/.test(value) ) {
232         // Remember the original values
233         left = style.left;
234 
235         // Put in the new values to get a computed value out
236         if (rsLeft) {
237             element.runtimeStyle.left = element.currentStyle.left;
238         }
239         style.left = attribute === "fontSize" ? "1em" : (value || 0);
240         value = style.pixelLeft + "px";
241 
242         // Revert the changed values
243         style.left = left;
244         if (rsLeft) {
245             element.runtimeStyle.left = rsLeft;
246         }
247     }
248 
249     if (!/^(thin|medium|thick)$/i.test(value)) {
250         return Math.round(parseFloat(value)) + "px";
251     }
252 
253     return value;
254 }
255 
256 function asInt(val) {
257     return parseInt(val, 10);
258 }
259 
260 function parseBackgroundSizePosition(value, element, attribute, index) {
261     value = (value || '').split(',');
262     value = value[index || 0] || value[0] || 'auto';
263     value = _html2canvas.Util.trimText(value).split(' ');
264 
265     if(attribute === 'backgroundSize' && (!value[0] || value[0].match(/cover|contain|auto/))) {
266         //these values will be handled in the parent function
267     } else {
268         value[0] = (value[0].indexOf( "%" ) === -1) ? toPX(element, attribute + "X", value[0]) : value[0];
269         if(value[1] === undefined) {
270             if(attribute === 'backgroundSize') {
271                 value[1] = 'auto';
272                 return value;
273             } else {
274                 // IE 9 doesn't return double digit always
275                 value[1] = value[0];
276             }
277         }
278         value[1] = (value[1].indexOf("%") === -1) ? toPX(element, attribute + "Y", value[1]) : value[1];
279     }
280     return value;
281 }
282 
283 _html2canvas.Util.getCSS = function (element, attribute, index) {
284     if (previousElement !== element) {
285       computedCSS = document.defaultView.getComputedStyle(element, null);
286     }
287 
288     var value = computedCSS[attribute];
289 
290     if (/^background(Size|Position)$/.test(attribute)) {
291         return parseBackgroundSizePosition(value, element, attribute, index);
292     } else if (/border(Top|Bottom)(Left|Right)Radius/.test(attribute)) {
293       var arr = value.split(" ");
294       if (arr.length <= 1) {
295           arr[1] = arr[0];
296       }
297       return arr.map(asInt);
298     }
299 
300   return value;
301 };
302 
303 _html2canvas.Util.resizeBounds = function( current_width, current_height, target_width, target_height, stretch_mode ){
304   var target_ratio = target_width / target_height,
305     current_ratio = current_width / current_height,
306     output_width, output_height;
307 
308   if(!stretch_mode || stretch_mode === 'auto') {
309     output_width = target_width;
310     output_height = target_height;
311   } else if(target_ratio < current_ratio ^ stretch_mode === 'contain') {
312     output_height = target_height;
313     output_width = target_height * current_ratio;
314   } else {
315     output_width = target_width;
316     output_height = target_width / current_ratio;
317   }
318 
319   return {
320     width: output_width,
321     height: output_height
322   };
323 };
324 
325 function backgroundBoundsFactory( prop, el, bounds, image, imageIndex, backgroundSize ) {
326     var bgposition =  _html2canvas.Util.getCSS( el, prop, imageIndex ) ,
327     topPos,
328     left,
329     percentage,
330     val;
331 
332     if (bgposition.length === 1){
333       val = bgposition[0];
334 
335       bgposition = [];
336 
337       bgposition[0] = val;
338       bgposition[1] = val;
339     }
340 
341     if (bgposition[0].toString().indexOf("%") !== -1){
342       percentage = (parseFloat(bgposition[0])/100);
343       left = bounds.width * percentage;
344       if(prop !== 'backgroundSize') {
345         left -= (backgroundSize || image).width*percentage;
346       }
347     } else {
348       if(prop === 'backgroundSize') {
349         if(bgposition[0] === 'auto') {
350           left = image.width;
351         } else {
352           if (/contain|cover/.test(bgposition[0])) {
353             var resized = _html2canvas.Util.resizeBounds(image.width, image.height, bounds.width, bounds.height, bgposition[0]);
354             left = resized.width;
355             topPos = resized.height;
356           } else {
357             left = parseInt(bgposition[0], 10);
358           }
359         }
360       } else {
361         left = parseInt( bgposition[0], 10);
362       }
363     }
364 
365 
366     if(bgposition[1] === 'auto') {
367       topPos = left / image.width * image.height;
368     } else if (bgposition[1].toString().indexOf("%") !== -1){
369       percentage = (parseFloat(bgposition[1])/100);
370       topPos =  bounds.height * percentage;
371       if(prop !== 'backgroundSize') {
372         topPos -= (backgroundSize || image).height * percentage;
373       }
374 
375     } else {
376       topPos = parseInt(bgposition[1],10);
377     }
378 
379     return [left, topPos];
380 }
381 
382 _html2canvas.Util.BackgroundPosition = function( el, bounds, image, imageIndex, backgroundSize ) {
383     var result = backgroundBoundsFactory( 'backgroundPosition', el, bounds, image, imageIndex, backgroundSize );
384     return { left: result[0], top: result[1] };
385 };
386 
387 _html2canvas.Util.BackgroundSize = function( el, bounds, image, imageIndex ) {
388     var result = backgroundBoundsFactory( 'backgroundSize', el, bounds, image, imageIndex );
389     return { width: result[0], height: result[1] };
390 };
391 
392 _html2canvas.Util.Extend = function (options, defaults) {
393   for (var key in options) {
394     if (options.hasOwnProperty(key)) {
395       defaults[key] = options[key];
396     }
397   }
398   return defaults;
399 };
400 
401 
402 /*
403  * Derived from jQuery.contents()
404  * Copyright 2010, John Resig
405  * Dual licensed under the MIT or GPL Version 2 licenses.
406  * http://jquery.org/license
407  */
408 _html2canvas.Util.Children = function( elem ) {
409   var children;
410   try {
411     children = (elem.nodeName && elem.nodeName.toUpperCase() === "IFRAME") ? elem.contentDocument || elem.contentWindow.document : (function(array) {
412       var ret = [];
413       if (array !== null) {
414         (function(first, second ) {
415           var i = first.length,
416           j = 0;
417 
418           if (typeof second.length === "number") {
419             for (var l = second.length; j < l; j++) {
420               first[i++] = second[j];
421             }
422           } else {
423             while (second[j] !== undefined) {
424               first[i++] = second[j++];
425             }
426           }
427 
428           first.length = i;
429 
430           return first;
431         })(ret, array);
432       }
433       return ret;
434     })(elem.childNodes);
435 
436   } catch (ex) {
437     _html2canvas.Util.log("html2canvas.Util.Children failed with exception: " + ex.message);
438     children = [];
439   }
440   return children;
441 };
442 
443 _html2canvas.Util.isTransparent = function(backgroundColor) {
444   return (backgroundColor === "transparent" || backgroundColor === "rgba(0, 0, 0, 0)");
445 };
446 _html2canvas.Util.Font = (function () {
447 
448   var fontData = {};
449 
450   return function(font, fontSize, doc) {
451     if (fontData[font + "-" + fontSize] !== undefined) {
452       return fontData[font + "-" + fontSize];
453     }
454 
455     var container = doc.createElement('div'),
456     img = doc.createElement('img'),
457     span = doc.createElement('span'),
458     sampleText = 'Hidden Text',
459     baseline,
460     middle,
461     metricsObj;
462 
463     container.style.visibility = "hidden";
464     container.style.fontFamily = font;
465     container.style.fontSize = fontSize;
466     container.style.margin = 0;
467     container.style.padding = 0;
468 
469     doc.body.appendChild(container);
470 
471     // http://probablyprogramming.com/2009/03/15/the-tiniest-gif-ever (handtinywhite.gif)
472     img.src = "data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=";
473     img.width = 1;
474     img.height = 1;
475 
476     img.style.margin = 0;
477     img.style.padding = 0;
478     img.style.verticalAlign = "baseline";
479 
480     span.style.fontFamily = font;
481     span.style.fontSize = fontSize;
482     span.style.margin = 0;
483     span.style.padding = 0;
484 
485     span.appendChild(doc.createTextNode(sampleText));
486     container.appendChild(span);
487     container.appendChild(img);
488     baseline = (img.offsetTop - span.offsetTop) + 1;
489 
490     container.removeChild(span);
491     container.appendChild(doc.createTextNode(sampleText));
492 
493     container.style.lineHeight = "normal";
494     img.style.verticalAlign = "super";
495 
496     middle = (img.offsetTop-container.offsetTop) + 1;
497     metricsObj = {
498       baseline: baseline,
499       lineWidth: 1,
500       middle: middle
501     };
502 
503     fontData[font + "-" + fontSize] = metricsObj;
504 
505     doc.body.removeChild(container);
506 
507     return metricsObj;
508   };
509 })();
510 
511 (function(){
512   var Util = _html2canvas.Util,
513     Generate = {};
514 
515   _html2canvas.Generate = Generate;
516 
517   var reGradients = [
518   /^(-webkit-linear-gradient)\(([a-z\s]+)([\w\d\.\s,%\(\)]+)\)$/,
519   /^(-o-linear-gradient)\(([a-z\s]+)([\w\d\.\s,%\(\)]+)\)$/,
520   /^(-webkit-gradient)\((linear|radial),\s((?:\d{1,3}%?)\s(?:\d{1,3}%?),\s(?:\d{1,3}%?)\s(?:\d{1,3}%?))([\w\d\.\s,%\(\)\-]+)\)$/,
521   /^(-moz-linear-gradient)\(((?:\d{1,3}%?)\s(?:\d{1,3}%?))([\w\d\.\s,%\(\)]+)\)$/,
522   /^(-webkit-radial-gradient)\(((?:\d{1,3}%?)\s(?:\d{1,3}%?)),\s(\w+)\s([a-z\-]+)([\w\d\.\s,%\(\)]+)\)$/,
523   /^(-moz-radial-gradient)\(((?:\d{1,3}%?)\s(?:\d{1,3}%?)),\s(\w+)\s?([a-z\-]*)([\w\d\.\s,%\(\)]+)\)$/,
524   /^(-o-radial-gradient)\(((?:\d{1,3}%?)\s(?:\d{1,3}%?)),\s(\w+)\s([a-z\-]+)([\w\d\.\s,%\(\)]+)\)$/
525   ];
526 
527   /*
528  * TODO: Add IE10 vendor prefix (-ms) support
529  * TODO: Add W3C gradient (linear-gradient) support
530  * TODO: Add old Webkit -webkit-gradient(radial, ...) support
531  * TODO: Maybe some RegExp optimizations are possible ;o)
532  */
533   Generate.parseGradient = function(css, bounds) {
534     var gradient, i, len = reGradients.length, m1, stop, m2, m2Len, step, m3, tl,tr,br,bl;
535 
536     for(i = 0; i < len; i+=1){
537       m1 = css.match(reGradients[i]);
538       if(m1) {
539         break;
540       }
541     }
542 
543     if(m1) {
544       switch(m1[1]) {
545         case '-webkit-linear-gradient':
546         case '-o-linear-gradient':
547 
548           gradient = {
549             type: 'linear',
550             x0: null,
551             y0: null,
552             x1: null,
553             y1: null,
554             colorStops: []
555           };
556 
557           // get coordinates
558           m2 = m1[2].match(/\w+/g);
559           if(m2){
560             m2Len = m2.length;
561             for(i = 0; i < m2Len; i+=1){
562               switch(m2[i]) {
563                 case 'top':
564                   gradient.y0 = 0;
565                   gradient.y1 = bounds.height;
566                   break;
567 
568                 case 'right':
569                   gradient.x0 = bounds.width;
570                   gradient.x1 = 0;
571                   break;
572 
573                 case 'bottom':
574                   gradient.y0 = bounds.height;
575                   gradient.y1 = 0;
576                   break;
577 
578                 case 'left':
579                   gradient.x0 = 0;
580                   gradient.x1 = bounds.width;
581                   break;
582               }
583             }
584           }
585           if(gradient.x0 === null && gradient.x1 === null){ // center
586             gradient.x0 = gradient.x1 = bounds.width / 2;
587           }
588           if(gradient.y0 === null && gradient.y1 === null){ // center
589             gradient.y0 = gradient.y1 = bounds.height / 2;
590           }
591 
592           // get colors and stops
593           m2 = m1[3].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)(?:\s\d{1,3}(?:%|px))?)+/g);
594           if(m2){
595             m2Len = m2.length;
596             step = 1 / Math.max(m2Len - 1, 1);
597             for(i = 0; i < m2Len; i+=1){
598               m3 = m2[i].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\s*(\d{1,3})?(%|px)?/);
599               if(m3[2]){
600                 stop = parseFloat(m3[2]);
601                 if(m3[3] === '%'){
602                   stop /= 100;
603                 } else { // px - stupid opera
604                   stop /= bounds.width;
605                 }
606               } else {
607                 stop = i * step;
608               }
609               gradient.colorStops.push({
610                 color: m3[1],
611                 stop: stop
612               });
613             }
614           }
615           break;
616 
617         case '-webkit-gradient':
618 
619           gradient = {
620             type: m1[2] === 'radial' ? 'circle' : m1[2], // TODO: Add radial gradient support for older mozilla definitions
621             x0: 0,
622             y0: 0,
623             x1: 0,
624             y1: 0,
625             colorStops: []
626           };
627 
628           // get coordinates
629           m2 = m1[3].match(/(\d{1,3})%?\s(\d{1,3})%?,\s(\d{1,3})%?\s(\d{1,3})%?/);
630           if(m2){
631             gradient.x0 = (m2[1] * bounds.width) / 100;
632             gradient.y0 = (m2[2] * bounds.height) / 100;
633             gradient.x1 = (m2[3] * bounds.width) / 100;
634             gradient.y1 = (m2[4] * bounds.height) / 100;
635           }
636 
637           // get colors and stops
638           m2 = m1[4].match(/((?:from|to|color-stop)\((?:[0-9\.]+,\s)?(?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)\))+/g);
639           if(m2){
640             m2Len = m2.length;
641             for(i = 0; i < m2Len; i+=1){
642               m3 = m2[i].match(/(from|to|color-stop)\(([0-9\.]+)?(?:,\s)?((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\)/);
643               stop = parseFloat(m3[2]);
644               if(m3[1] === 'from') {
645                 stop = 0.0;
646               }
647               if(m3[1] === 'to') {
648                 stop = 1.0;
649               }
650               gradient.colorStops.push({
651                 color: m3[3],
652                 stop: stop
653               });
654             }
655           }
656           break;
657 
658         case '-moz-linear-gradient':
659 
660           gradient = {
661             type: 'linear',
662             x0: 0,
663             y0: 0,
664             x1: 0,
665             y1: 0,
666             colorStops: []
667           };
668 
669           // get coordinates
670           m2 = m1[2].match(/(\d{1,3})%?\s(\d{1,3})%?/);
671 
672           // m2[1] == 0%   -> left
673           // m2[1] == 50%  -> center
674           // m2[1] == 100% -> right
675 
676           // m2[2] == 0%   -> top
677           // m2[2] == 50%  -> center
678           // m2[2] == 100% -> bottom
679 
680           if(m2){
681             gradient.x0 = (m2[1] * bounds.width) / 100;
682             gradient.y0 = (m2[2] * bounds.height) / 100;
683             gradient.x1 = bounds.width - gradient.x0;
684             gradient.y1 = bounds.height - gradient.y0;
685           }
686 
687           // get colors and stops
688           m2 = m1[3].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)(?:\s\d{1,3}%)?)+/g);
689           if(m2){
690             m2Len = m2.length;
691             step = 1 / Math.max(m2Len - 1, 1);
692             for(i = 0; i < m2Len; i+=1){
693               m3 = m2[i].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\s*(\d{1,3})?(%)?/);
694               if(m3[2]){
695                 stop = parseFloat(m3[2]);
696                 if(m3[3]){ // percentage
697                   stop /= 100;
698                 }
699               } else {
700                 stop = i * step;
701               }
702               gradient.colorStops.push({
703                 color: m3[1],
704                 stop: stop
705               });
706             }
707           }
708           break;
709 
710         case '-webkit-radial-gradient':
711         case '-moz-radial-gradient':
712         case '-o-radial-gradient':
713 
714           gradient = {
715             type: 'circle',
716             x0: 0,
717             y0: 0,
718             x1: bounds.width,
719             y1: bounds.height,
720             cx: 0,
721             cy: 0,
722             rx: 0,
723             ry: 0,
724             colorStops: []
725           };
726 
727           // center
728           m2 = m1[2].match(/(\d{1,3})%?\s(\d{1,3})%?/);
729           if(m2){
730             gradient.cx = (m2[1] * bounds.width) / 100;
731             gradient.cy = (m2[2] * bounds.height) / 100;
732           }
733 
734           // size
735           m2 = m1[3].match(/\w+/);
736           m3 = m1[4].match(/[a-z\-]*/);
737           if(m2 && m3){
738             switch(m3[0]){
739               case 'farthest-corner':
740               case 'cover': // is equivalent to farthest-corner
741               case '': // mozilla removes "cover" from definition :(
742                 tl = Math.sqrt(Math.pow(gradient.cx, 2) + Math.pow(gradient.cy, 2));
743                 tr = Math.sqrt(Math.pow(gradient.cx, 2) + Math.pow(gradient.y1 - gradient.cy, 2));
744                 br = Math.sqrt(Math.pow(gradient.x1 - gradient.cx, 2) + Math.pow(gradient.y1 - gradient.cy, 2));
745                 bl = Math.sqrt(Math.pow(gradient.x1 - gradient.cx, 2) + Math.pow(gradient.cy, 2));
746                 gradient.rx = gradient.ry = Math.max(tl, tr, br, bl);
747                 break;
748               case 'closest-corner':
749                 tl = Math.sqrt(Math.pow(gradient.cx, 2) + Math.pow(gradient.cy, 2));
750                 tr = Math.sqrt(Math.pow(gradient.cx, 2) + Math.pow(gradient.y1 - gradient.cy, 2));
751                 br = Math.sqrt(Math.pow(gradient.x1 - gradient.cx, 2) + Math.pow(gradient.y1 - gradient.cy, 2));
752                 bl = Math.sqrt(Math.pow(gradient.x1 - gradient.cx, 2) + Math.pow(gradient.cy, 2));
753                 gradient.rx = gradient.ry = Math.min(tl, tr, br, bl);
754                 break;
755               case 'farthest-side':
756                 if(m2[0] === 'circle'){
757                   gradient.rx = gradient.ry = Math.max(
758                     gradient.cx,
759                     gradient.cy,
760                     gradient.x1 - gradient.cx,
761                     gradient.y1 - gradient.cy
762                     );
763                 } else { // ellipse
764 
765                   gradient.type = m2[0];
766 
767                   gradient.rx = Math.max(
768                     gradient.cx,
769                     gradient.x1 - gradient.cx
770                     );
771                   gradient.ry = Math.max(
772                     gradient.cy,
773                     gradient.y1 - gradient.cy
774                     );
775                 }
776                 break;
777               case 'closest-side':
778               case 'contain': // is equivalent to closest-side
779                 if(m2[0] === 'circle'){
780                   gradient.rx = gradient.ry = Math.min(
781                     gradient.cx,
782                     gradient.cy,
783                     gradient.x1 - gradient.cx,
784                     gradient.y1 - gradient.cy
785                     );
786                 } else { // ellipse
787 
788                   gradient.type = m2[0];
789 
790                   gradient.rx = Math.min(
791                     gradient.cx,
792                     gradient.x1 - gradient.cx
793                     );
794                   gradient.ry = Math.min(
795                     gradient.cy,
796                     gradient.y1 - gradient.cy
797                     );
798                 }
799                 break;
800 
801             // TODO: add support for "30px 40px" sizes (webkit only)
802             }
803           }
804 
805           // color stops
806           m2 = m1[5].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\)(?:\s\d{1,3}(?:%|px))?)+/g);
807           if(m2){
808             m2Len = m2.length;
809             step = 1 / Math.max(m2Len - 1, 1);
810             for(i = 0; i < m2Len; i+=1){
811               m3 = m2[i].match(/((?:rgb|rgba)\(\d{1,3},\s\d{1,3},\s\d{1,3}(?:,\s[0-9\.]+)?\))\s*(\d{1,3})?(%|px)?/);
812               if(m3[2]){
813                 stop = parseFloat(m3[2]);
814                 if(m3[3] === '%'){
815                   stop /= 100;
816                 } else { // px - stupid opera
817                   stop /= bounds.width;
818                 }
819               } else {
820                 stop = i * step;
821               }
822               gradient.colorStops.push({
823                 color: m3[1],
824                 stop: stop
825               });
826             }
827           }
828           break;
829       }
830     }
831 
832     return gradient;
833   };
834 
835   function addScrollStops(grad) {
836     return function(colorStop) {
837       try {
838         grad.addColorStop(colorStop.stop, colorStop.color);
839       }
840       catch(e) {
841         Util.log(['failed to add color stop: ', e, '; tried to add: ', colorStop]);
842       }
843     };
844   }
845 
846   Generate.Gradient = function(src, bounds) {
847     if(bounds.width === 0 || bounds.height === 0) {
848       return;
849     }
850 
851     var canvas = document.createElement('canvas'),
852     ctx = canvas.getContext('2d'),
853     gradient, grad;
854 
855     canvas.width = bounds.width;
856     canvas.height = bounds.height;
857 
858     // TODO: add support for multi defined background gradients
859     gradient = _html2canvas.Generate.parseGradient(src, bounds);
860 
861     if(gradient) {
862       switch(gradient.type) {
863         case 'linear':
864           grad = ctx.createLinearGradient(gradient.x0, gradient.y0, gradient.x1, gradient.y1);
865           gradient.colorStops.forEach(addScrollStops(grad));
866           ctx.fillStyle = grad;
867           ctx.fillRect(0, 0, bounds.width, bounds.height);
868           break;
869 
870         case 'circle':
871           grad = ctx.createRadialGradient(gradient.cx, gradient.cy, 0, gradient.cx, gradient.cy, gradient.rx);
872           gradient.colorStops.forEach(addScrollStops(grad));
873           ctx.fillStyle = grad;
874           ctx.fillRect(0, 0, bounds.width, bounds.height);
875           break;
876 
877         case 'ellipse':
878           var canvasRadial = document.createElement('canvas'),
879             ctxRadial = canvasRadial.getContext('2d'),
880             ri = Math.max(gradient.rx, gradient.ry),
881             di = ri * 2;
882 
883           canvasRadial.width = canvasRadial.height = di;
884 
885           grad = ctxRadial.createRadialGradient(gradient.rx, gradient.ry, 0, gradient.rx, gradient.ry, ri);
886           gradient.colorStops.forEach(addScrollStops(grad));
887 
888           ctxRadial.fillStyle = grad;
889           ctxRadial.fillRect(0, 0, di, di);
890 
891           ctx.fillStyle = gradient.colorStops[gradient.colorStops.length - 1].color;
892           ctx.fillRect(0, 0, canvas.width, canvas.height);
893           ctx.drawImage(canvasRadial, gradient.cx - gradient.rx, gradient.cy - gradient.ry, 2 * gradient.rx, 2 * gradient.ry);
894           break;
895       }
896     }
897 
898     return canvas;
899   };
900 
901   Generate.ListAlpha = function(number) {
902     var tmp = "",
903     modulus;
904 
905     do {
906       modulus = number % 26;
907       tmp = String.fromCharCode((modulus) + 64) + tmp;
908       number = number / 26;
909     }while((number*26) > 26);
910 
911     return tmp;
912   };
913 
914   Generate.ListRoman = function(number) {
915     var romanArray = ["M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"],
916     decimal = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1],
917     roman = "",
918     v,
919     len = romanArray.length;
920 
921     if (number <= 0 || number >= 4000) {
922       return number;
923     }
924 
925     for (v=0; v < len; v+=1) {
926       while (number >= decimal[v]) {
927         number -= decimal[v];
928         roman += romanArray[v];
929       }
930     }
931 
932     return roman;
933   };
934 })();
935 function h2cRenderContext(width, height) {
936   var storage = [];
937   return {
938     storage: storage,
939     width: width,
940     height: height,
941     clip: function() {
942       storage.push({
943         type: "function",
944         name: "clip",
945         'arguments': arguments
946       });
947     },
948     translate: function() {
949       storage.push({
950         type: "function",
951         name: "translate",
952         'arguments': arguments
953       });
954     },
955     fill: function() {
956       storage.push({
957         type: "function",
958         name: "fill",
959         'arguments': arguments
960       });
961     },
962     save: function() {
963       storage.push({
964         type: "function",
965         name: "save",
966         'arguments': arguments
967       });
968     },
969     restore: function() {
970       storage.push({
971         type: "function",
972         name: "restore",
973         'arguments': arguments
974       });
975     },
976     fillRect: function () {
977       storage.push({
978         type: "function",
979         name: "fillRect",
980         'arguments': arguments
981       });
982     },
983     createPattern: function() {
984       storage.push({
985         type: "function",
986         name: "createPattern",
987         'arguments': arguments
988       });
989     },
990     drawShape: function() {
991 
992       var shape = [];
993 
994       storage.push({
995         type: "function",
996         name: "drawShape",
997         'arguments': shape
998       });
999 
1000       return {
1001         moveTo: function() {
1002           shape.push({
1003             name: "moveTo",
1004             'arguments': arguments
1005           });
1006         },
1007         lineTo: function() {
1008           shape.push({
1009             name: "lineTo",
1010             'arguments': arguments
1011           });
1012         },
1013         arcTo: function() {
1014           shape.push({
1015             name: "arcTo",
1016             'arguments': arguments
1017           });
1018         },
1019         bezierCurveTo: function() {
1020           shape.push({
1021             name: "bezierCurveTo",
1022             'arguments': arguments
1023           });
1024         },
1025         quadraticCurveTo: function() {
1026           shape.push({
1027             name: "quadraticCurveTo",
1028             'arguments': arguments
1029           });
1030         }
1031       };
1032 
1033     },
1034     drawImage: function () {
1035       storage.push({
1036         type: "function",
1037         name: "drawImage",
1038         'arguments': arguments
1039       });
1040     },
1041     fillText: function () {
1042       storage.push({
1043         type: "function",
1044         name: "fillText",
1045         'arguments': arguments
1046       });
1047     },
1048     setVariable: function (variable, value) {
1049       storage.push({
1050         type: "variable",
1051         name: variable,
1052         'arguments': value
1053       });
1054       return value;
1055     }
1056   };
1057 }
1058 _html2canvas.Parse = function (images, options) {
1059   window.scroll(0,0);
1060 
1061   var element = (( options.elements === undefined ) ? document.body : options.elements[0]), // select body by default
1062   numDraws = 0,
1063   doc = element.ownerDocument,
1064   Util = _html2canvas.Util,
1065   support = Util.Support(options, doc),
1066   ignoreElementsRegExp = new RegExp("(" + options.ignoreElements + ")"),
1067   body = doc.body,
1068   getCSS = Util.getCSS,
1069   pseudoHide = "___html2canvas___pseudoelement",
1070   hidePseudoElements = doc.createElement('style');
1071 
1072   hidePseudoElements.innerHTML = '.' + pseudoHide + '-before:before { content: "" !important; display: none !important; }' +
1073   '.' + pseudoHide + '-after:after { content: "" !important; display: none !important; }';
1074 
1075   body.appendChild(hidePseudoElements);
1076 
1077   images = images || {};
1078 
1079   function documentWidth () {
1080     return Math.max(
1081       Math.max(doc.body.scrollWidth, doc.documentElement.scrollWidth),
1082       Math.max(doc.body.offsetWidth, doc.documentElement.offsetWidth),
1083       Math.max(doc.body.clientWidth, doc.documentElement.clientWidth)
1084       );
1085   }
1086 
1087   function documentHeight () {
1088     return Math.max(
1089       Math.max(doc.body.scrollHeight, doc.documentElement.scrollHeight),
1090       Math.max(doc.body.offsetHeight, doc.documentElement.offsetHeight),
1091       Math.max(doc.body.clientHeight, doc.documentElement.clientHeight)
1092       );
1093   }
1094 
1095   function getCSSInt(element, attribute) {
1096     var val = parseInt(getCSS(element, attribute), 10);
1097     return (isNaN(val)) ? 0 : val; // borders in old IE are throwing 'medium' for demo.html
1098   }
1099 
1100   function renderRect (ctx, x, y, w, h, bgcolor) {
1101     if (bgcolor !== "transparent"){
1102       ctx.setVariable("fillStyle", bgcolor);
1103       ctx.fillRect(x, y, w, h);
1104       numDraws+=1;
1105     }
1106   }
1107 
1108   function capitalize(m, p1, p2) {
1109     if (m.length > 0) {
1110       return p1 + p2.toUpperCase();
1111     }
1112   }
1113 
1114   function textTransform (text, transform) {
1115     switch(transform){
1116       case "lowercase":
1117         return text.toLowerCase();
1118       case "capitalize":
1119         return text.replace( /(^|\s|:|-|\(|\))([a-z])/g, capitalize);
1120       case "uppercase":
1121         return text.toUpperCase();
1122       default:
1123         return text;
1124     }
1125   }
1126 
1127   function noLetterSpacing(letter_spacing) {
1128     return (/^(normal|none|0px)$/.test(letter_spacing));
1129   }
1130 
1131   function drawText(currentText, x, y, ctx){
1132     if (currentText !== null && Util.trimText(currentText).length > 0) {
1133       ctx.fillText(currentText, x, y);
1134       numDraws+=1;
1135     }
1136   }
1137 
1138   function setTextVariables(ctx, el, text_decoration, color) {
1139     var align = false,
1140     bold = getCSS(el, "fontWeight"),
1141     family = getCSS(el, "fontFamily"),
1142     size = getCSS(el, "fontSize"),
1143     shadows = Util.parseTextShadows(getCSS(el, "textShadow"));
1144 
1145     switch(parseInt(bold, 10)){
1146       case 401:
1147         bold = "bold";
1148         break;
1149       case 400:
1150         bold = "normal";
1151         break;
1152     }
1153 
1154     ctx.setVariable("fillStyle", color);
1155     ctx.setVariable("font", [getCSS(el, "fontStyle"), getCSS(el, "fontVariant"), bold, size, family].join(" "));
1156     ctx.setVariable("textAlign", (align) ? "right" : "left");
1157 
1158     if (shadows.length) {
1159       // TODO: support multiple text shadows
1160       // apply the first text shadow
1161       ctx.setVariable("shadowColor", shadows[0].color);
1162       ctx.setVariable("shadowOffsetX", shadows[0].offsetX);
1163       ctx.setVariable("shadowOffsetY", shadows[0].offsetY);
1164       ctx.setVariable("shadowBlur", shadows[0].blur);
1165     }
1166 
1167     if (text_decoration !== "none"){
1168       return Util.Font(family, size, doc);
1169     }
1170   }
1171 
1172   function renderTextDecoration(ctx, text_decoration, bounds, metrics, color) {
1173     switch(text_decoration) {
1174       case "underline":
1175         // Draws a line at the baseline of the font
1176         // TODO As some browsers display the line as more than 1px if the font-size is big, need to take that into account both in position and size
1177         renderRect(ctx, bounds.left, Math.round(bounds.top + metrics.baseline + metrics.lineWidth), bounds.width, 1, color);
1178         break;
1179       case "overline":
1180         renderRect(ctx, bounds.left, Math.round(bounds.top), bounds.width, 1, color);
1181         break;
1182       case "line-through":
1183         // TODO try and find exact position for line-through
1184         renderRect(ctx, bounds.left, Math.ceil(bounds.top + metrics.middle + metrics.lineWidth), bounds.width, 1, color);
1185         break;
1186     }
1187   }
1188 
1189   function getTextBounds(state, text, textDecoration, isLast, transform) {
1190     var bounds;
1191     if (support.rangeBounds && !transform) {
1192       if (textDecoration !== "none" || Util.trimText(text).length !== 0) {
1193         bounds = textRangeBounds(text, state.node, state.textOffset);
1194       }
1195       state.textOffset += text.length;
1196     } else if (state.node && typeof state.node.nodeValue === "string" ){
1197       var newTextNode = (isLast) ? state.node.splitText(text.length) : null;
1198       bounds = textWrapperBounds(state.node, transform);
1199       state.node = newTextNode;
1200     }
1201     return bounds;
1202   }
1203 
1204   function textRangeBounds(text, textNode, textOffset) {
1205     var range = doc.createRange();
1206     range.setStart(textNode, textOffset);
1207     range.setEnd(textNode, textOffset + text.length);
1208     return range.getBoundingClientRect();
1209   }
1210 
1211   function textWrapperBounds(oldTextNode, transform) {
1212     var parent = oldTextNode.parentNode,
1213     wrapElement = doc.createElement('wrapper'),
1214     backupText = oldTextNode.cloneNode(true);
1215 
1216     wrapElement.appendChild(oldTextNode.cloneNode(true));
1217     parent.replaceChild(wrapElement, oldTextNode);
1218 
1219     var bounds = transform ? Util.OffsetBounds(wrapElement) : Util.Bounds(wrapElement);
1220     parent.replaceChild(backupText, wrapElement);
1221     return bounds;
1222   }
1223 
1224   function renderText(el, textNode, stack) {
1225     var ctx = stack.ctx,
1226     color = getCSS(el, "color"),
1227     textDecoration = getCSS(el, "textDecoration"),
1228     textAlign = getCSS(el, "textAlign"),
1229     metrics,
1230     textList,
1231     state = {
1232       node: textNode,
1233       textOffset: 0
1234     };
1235 
1236     if (Util.trimText(textNode.nodeValue).length > 0) {
1237       textNode.nodeValue = textTransform(textNode.nodeValue, getCSS(el, "textTransform"));
1238       textAlign = textAlign.replace(["-webkit-auto"],["auto"]);
1239 
1240       textList = (!options.letterRendering && /^(left|right|justify|auto)$/.test(textAlign) && noLetterSpacing(getCSS(el, "letterSpacing"))) ?
1241       textNode.nodeValue.split(/(\b| )/)
1242       : textNode.nodeValue.split("");
1243 
1244       metrics = setTextVariables(ctx, el, textDecoration, color);
1245 
1246       if (options.chinese) {
1247         textList.forEach(function(word, index) {
1248           if (/.*[\u4E00-\u9FA5].*$/.test(word)) {
1249             word = word.split("");
1250             word.unshift(index, 1);
1251             textList.splice.apply(textList, word);
1252           }
1253         });
1254       }
1255 
1256       textList.forEach(function(text, index) {
1257         var bounds = getTextBounds(state, text, textDecoration, (index < textList.length - 1), stack.transform.matrix);
1258         if (bounds) {
1259           drawText(text, bounds.left, bounds.bottom, ctx);
1260           renderTextDecoration(ctx, textDecoration, bounds, metrics, color);
1261         }
1262       });
1263     }
1264   }
1265 
1266   function listPosition (element, val) {
1267     var boundElement = doc.createElement( "boundelement" ),
1268     originalType,
1269     bounds;
1270 
1271     boundElement.style.display = "inline";
1272 
1273     originalType = element.style.listStyleType;
1274     element.style.listStyleType = "none";
1275 
1276     boundElement.appendChild(doc.createTextNode(val));
1277 
1278     element.insertBefore(boundElement, element.firstChild);
1279 
1280     bounds = Util.Bounds(boundElement);
1281     element.removeChild(boundElement);
1282     element.style.listStyleType = originalType;
1283     return bounds;
1284   }
1285 
1286   function elementIndex(el) {
1287     var i = -1,
1288     count = 1,
1289     childs = el.parentNode.childNodes;
1290 
1291     if (el.parentNode) {
1292       while(childs[++i] !== el) {
1293         if (childs[i].nodeType === 1) {
1294           count++;
1295         }
1296       }
1297       return count;
1298     } else {
1299       return -1;
1300     }
1301   }
1302 
1303   function listItemText(element, type) {
1304     var currentIndex = elementIndex(element), text;
1305     switch(type){
1306       case "decimal":
1307         text = currentIndex;
1308         break;
1309       case "decimal-leading-zero":
1310         text = (currentIndex.toString().length === 1) ? currentIndex = "0" + currentIndex.toString() : currentIndex.toString();
1311         break;
1312       case "upper-roman":
1313         text = _html2canvas.Generate.ListRoman( currentIndex );
1314         break;
1315       case "lower-roman":
1316         text = _html2canvas.Generate.ListRoman( currentIndex ).toLowerCase();
1317         break;
1318       case "lower-alpha":
1319         text = _html2canvas.Generate.ListAlpha( currentIndex ).toLowerCase();
1320         break;
1321       case "upper-alpha":
1322         text = _html2canvas.Generate.ListAlpha( currentIndex );
1323         break;
1324     }
1325 
1326     return text + ". ";
1327   }
1328 
1329   function renderListItem(element, stack, elBounds) {
1330     var x,
1331     text,
1332     ctx = stack.ctx,
1333     type = getCSS(element, "listStyleType"),
1334     listBounds;
1335 
1336     if (/^(decimal|decimal-leading-zero|upper-alpha|upper-latin|upper-roman|lower-alpha|lower-greek|lower-latin|lower-roman)$/i.test(type)) {
1337       text = listItemText(element, type);
1338       listBounds = listPosition(element, text);
1339       setTextVariables(ctx, element, "none", getCSS(element, "color"));
1340 
1341       if (getCSS(element, "listStylePosition") === "inside") {
1342         ctx.setVariable("textAlign", "left");
1343         x = elBounds.left;
1344       } else {
1345         return;
1346       }
1347 
1348       drawText(text, x, listBounds.bottom, ctx);
1349     }
1350   }
1351 
1352   function loadImage (src){
1353     var img = images[src];
1354     return (img && img.succeeded === true) ? img.img : false;
1355   }
1356 
1357   function clipBounds(src, dst){
1358     var x = Math.max(src.left, dst.left),
1359     y = Math.max(src.top, dst.top),
1360     x2 = Math.min((src.left + src.width), (dst.left + dst.width)),
1361     y2 = Math.min((src.top + src.height), (dst.top + dst.height));
1362 
1363     return {
1364       left:x,
1365       top:y,
1366       width:x2-x,
1367       height:y2-y
1368     };
1369   }
1370 
1371   function setZ(element, stack, parentStack){
1372     var newContext,
1373     isPositioned = stack.cssPosition !== 'static',
1374     zIndex = isPositioned ? getCSS(element, 'zIndex') : 'auto',
1375     opacity = getCSS(element, 'opacity'),
1376     isFloated = getCSS(element, 'cssFloat') !== 'none';
1377 
1378     // https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Understanding_z_index/The_stacking_context
1379     // When a new stacking context should be created:
1380     // the root element (HTML),
1381     // positioned (absolutely or relatively) with a z-index value other than "auto",
1382     // elements with an opacity value less than 1. (See the specification for opacity),
1383     // on mobile WebKit and Chrome 22+, position: fixed always creates a new stacking context, even when z-index is "auto" (See this post)
1384 
1385     stack.zIndex = newContext = h2czContext(zIndex);
1386     newContext.isPositioned = isPositioned;
1387     newContext.isFloated = isFloated;
1388     newContext.opacity = opacity;
1389     newContext.ownStacking = (zIndex !== 'auto' || opacity < 1);
1390 
1391     if (parentStack) {
1392       parentStack.zIndex.children.push(stack);
1393     }
1394   }
1395 
1396   function renderImage(ctx, element, image, bounds, borders) {
1397 
1398     var paddingLeft = getCSSInt(element, 'paddingLeft'),
1399     paddingTop = getCSSInt(element, 'paddingTop'),
1400     paddingRight = getCSSInt(element, 'paddingRight'),
1401     paddingBottom = getCSSInt(element, 'paddingBottom');
1402 
1403     drawImage(
1404       ctx,
1405       image,
1406       0, //sx
1407       0, //sy
1408       image.width, //sw
1409       image.height, //sh
1410       bounds.left + paddingLeft + borders[3].width, //dx
1411       bounds.top + paddingTop + borders[0].width, // dy
1412       bounds.width - (borders[1].width + borders[3].width + paddingLeft + paddingRight), //dw
1413       bounds.height - (borders[0].width + borders[2].width + paddingTop + paddingBottom) //dh
1414       );
1415   }
1416 
1417   function getBorderData(element) {
1418     return ["Top", "Right", "Bottom", "Left"].map(function(side) {
1419       return {
1420         width: getCSSInt(element, 'border' + side + 'Width'),
1421         color: getCSS(element, 'border' + side + 'Color')
1422       };
1423     });
1424   }
1425 
1426   function getBorderRadiusData(element) {
1427     return ["TopLeft", "TopRight", "BottomRight", "BottomLeft"].map(function(side) {
1428       return getCSS(element, 'border' + side + 'Radius');
1429     });
1430   }
1431 
1432   var getCurvePoints = (function(kappa) {
1433 
1434     return function(x, y, r1, r2) {
1435       var ox = (r1) * kappa, // control point offset horizontal
1436       oy = (r2) * kappa, // control point offset vertical
1437       xm = x + r1, // x-middle
1438       ym = y + r2; // y-middle
1439       return {
1440         topLeft: bezierCurve({
1441           x:x,
1442           y:ym
1443         }, {
1444           x:x,
1445           y:ym - oy
1446         }, {
1447           x:xm - ox,
1448           y:y
1449         }, {
1450           x:xm,
1451           y:y
1452         }),
1453         topRight: bezierCurve({
1454           x:x,
1455           y:y
1456         }, {
1457           x:x + ox,
1458           y:y
1459         }, {
1460           x:xm,
1461           y:ym - oy
1462         }, {
1463           x:xm,
1464           y:ym
1465         }),
1466         bottomRight: bezierCurve({
1467           x:xm,
1468           y:y
1469         }, {
1470           x:xm,
1471           y:y + oy
1472         }, {
1473           x:x + ox,
1474           y:ym
1475         }, {
1476           x:x,
1477           y:ym
1478         }),
1479         bottomLeft: bezierCurve({
1480           x:xm,
1481           y:ym
1482         }, {
1483           x:xm - ox,
1484           y:ym
1485         }, {
1486           x:x,
1487           y:y + oy
1488         }, {
1489           x:x,
1490           y:y
1491         })
1492       };
1493     };
1494   })(4 * ((Math.sqrt(2) - 1) / 3));
1495 
1496   function bezierCurve(start, startControl, endControl, end) {
1497 
1498     var lerp = function (a, b, t) {
1499       return {
1500         x:a.x + (b.x - a.x) * t,
1501         y:a.y + (b.y - a.y) * t
1502       };
1503     };
1504 
1505     return {
1506       start: start,
1507       startControl: startControl,
1508       endControl: endControl,
1509       end: end,
1510       subdivide: function(t) {
1511         var ab = lerp(start, startControl, t),
1512         bc = lerp(startControl, endControl, t),
1513         cd = lerp(endControl, end, t),
1514         abbc = lerp(ab, bc, t),
1515         bccd = lerp(bc, cd, t),
1516         dest = lerp(abbc, bccd, t);
1517         return [bezierCurve(start, ab, abbc, dest), bezierCurve(dest, bccd, cd, end)];
1518       },
1519       curveTo: function(borderArgs) {
1520         borderArgs.push(["bezierCurve", startControl.x, startControl.y, endControl.x, endControl.y, end.x, end.y]);
1521       },
1522       curveToReversed: function(borderArgs) {
1523         borderArgs.push(["bezierCurve", endControl.x, endControl.y, startControl.x, startControl.y, start.x, start.y]);
1524       }
1525     };
1526   }
1527 
1528   function parseCorner(borderArgs, radius1, radius2, corner1, corner2, x, y) {
1529     if (radius1[0] > 0 || radius1[1] > 0) {
1530       borderArgs.push(["line", corner1[0].start.x, corner1[0].start.y]);
1531       corner1[0].curveTo(borderArgs);
1532       corner1[1].curveTo(borderArgs);
1533     } else {
1534       borderArgs.push(["line", x, y]);
1535     }
1536 
1537     if (radius2[0] > 0 || radius2[1] > 0) {
1538       borderArgs.push(["line", corner2[0].start.x, corner2[0].start.y]);
1539     }
1540   }
1541 
1542   function drawSide(borderData, radius1, radius2, outer1, inner1, outer2, inner2) {
1543     var borderArgs = [];
1544 
1545     if (radius1[0] > 0 || radius1[1] > 0) {
1546       borderArgs.push(["line", outer1[1].start.x, outer1[1].start.y]);
1547       outer1[1].curveTo(borderArgs);
1548     } else {
1549       borderArgs.push([ "line", borderData.c1[0], borderData.c1[1]]);
1550     }
1551 
1552     if (radius2[0] > 0 || radius2[1] > 0) {
1553       borderArgs.push(["line", outer2[0].start.x, outer2[0].start.y]);
1554       outer2[0].curveTo(borderArgs);
1555       borderArgs.push(["line", inner2[0].end.x, inner2[0].end.y]);
1556       inner2[0].curveToReversed(borderArgs);
1557     } else {
1558       borderArgs.push([ "line", borderData.c2[0], borderData.c2[1]]);
1559       borderArgs.push([ "line", borderData.c3[0], borderData.c3[1]]);
1560     }
1561 
1562     if (radius1[0] > 0 || radius1[1] > 0) {
1563       borderArgs.push(["line", inner1[1].end.x, inner1[1].end.y]);
1564       inner1[1].curveToReversed(borderArgs);
1565     } else {
1566       borderArgs.push([ "line", borderData.c4[0], borderData.c4[1]]);
1567     }
1568 
1569     return borderArgs;
1570   }
1571 
1572   function calculateCurvePoints(bounds, borderRadius, borders) {
1573 
1574     var x = bounds.left,
1575     y = bounds.top,
1576     width = bounds.width,
1577     height = bounds.height,
1578 
1579     tlh = borderRadius[0][0],
1580     tlv = borderRadius[0][1],
1581     trh = borderRadius[1][0],
1582     trv = borderRadius[1][1],
1583     brh = borderRadius[2][0],
1584     brv = borderRadius[2][1],
1585     blh = borderRadius[3][0],
1586     blv = borderRadius[3][1],
1587 
1588     topWidth = width - trh,
1589     rightHeight = height - brv,
1590     bottomWidth = width - brh,
1591     leftHeight = height - blv;
1592 
1593     return {
1594       topLeftOuter: getCurvePoints(
1595         x,
1596         y,
1597         tlh,
1598         tlv
1599         ).topLeft.subdivide(0.5),
1600 
1601       topLeftInner: getCurvePoints(
1602         x + borders[3].width,
1603         y + borders[0].width,
1604         Math.max(0, tlh - borders[3].width),
1605         Math.max(0, tlv - borders[0].width)
1606         ).topLeft.subdivide(0.5),
1607 
1608       topRightOuter: getCurvePoints(
1609         x + topWidth,
1610         y,
1611         trh,
1612         trv
1613         ).topRight.subdivide(0.5),
1614 
1615       topRightInner: getCurvePoints(
1616         x + Math.min(topWidth, width + borders[3].width),
1617         y + borders[0].width,
1618         (topWidth > width + borders[3].width) ? 0 :trh - borders[3].width,
1619         trv - borders[0].width
1620         ).topRight.subdivide(0.5),
1621 
1622       bottomRightOuter: getCurvePoints(
1623         x + bottomWidth,
1624         y + rightHeight,
1625         brh,
1626         brv
1627         ).bottomRight.subdivide(0.5),
1628 
1629       bottomRightInner: getCurvePoints(
1630         x + Math.min(bottomWidth, width + borders[3].width),
1631         y + Math.min(rightHeight, height + borders[0].width),
1632         Math.max(0, brh - borders[1].width),
1633         Math.max(0, brv - borders[2].width)
1634         ).bottomRight.subdivide(0.5),
1635 
1636       bottomLeftOuter: getCurvePoints(
1637         x,
1638         y + leftHeight,
1639         blh,
1640         blv
1641         ).bottomLeft.subdivide(0.5),
1642 
1643       bottomLeftInner: getCurvePoints(
1644         x + borders[3].width,
1645         y + leftHeight,
1646         Math.max(0, blh - borders[3].width),
1647         Math.max(0, blv - borders[2].width)
1648         ).bottomLeft.subdivide(0.5)
1649     };
1650   }
1651 
1652   function getBorderClip(element, borderPoints, borders, radius, bounds) {
1653     var backgroundClip = getCSS(element, 'backgroundClip'),
1654     borderArgs = [];
1655 
1656     switch(backgroundClip) {
1657       case "content-box":
1658       case "padding-box":
1659         parseCorner(borderArgs, radius[0], radius[1], borderPoints.topLeftInner, borderPoints.topRightInner, bounds.left + borders[3].width, bounds.top + borders[0].width);
1660         parseCorner(borderArgs, radius[1], radius[2], borderPoints.topRightInner, borderPoints.bottomRightInner, bounds.left + bounds.width - borders[1].width, bounds.top + borders[0].width);
1661         parseCorner(borderArgs, radius[2], radius[3], borderPoints.bottomRightInner, borderPoints.bottomLeftInner, bounds.left + bounds.width - borders[1].width, bounds.top + bounds.height - borders[2].width);
1662         parseCorner(borderArgs, radius[3], radius[0], borderPoints.bottomLeftInner, borderPoints.topLeftInner, bounds.left + borders[3].width, bounds.top + bounds.height - borders[2].width);
1663         break;
1664 
1665       default:
1666         parseCorner(borderArgs, radius[0], radius[1], borderPoints.topLeftOuter, borderPoints.topRightOuter, bounds.left, bounds.top);
1667         parseCorner(borderArgs, radius[1], radius[2], borderPoints.topRightOuter, borderPoints.bottomRightOuter, bounds.left + bounds.width, bounds.top);
1668         parseCorner(borderArgs, radius[2], radius[3], borderPoints.bottomRightOuter, borderPoints.bottomLeftOuter, bounds.left + bounds.width, bounds.top + bounds.height);
1669         parseCorner(borderArgs, radius[3], radius[0], borderPoints.bottomLeftOuter, borderPoints.topLeftOuter, bounds.left, bounds.top + bounds.height);
1670         break;
1671     }
1672 
1673     return borderArgs;
1674   }
1675 
1676   function parseBorders(element, bounds, borders){
1677     var x = bounds.left,
1678     y = bounds.top,
1679     width = bounds.width,
1680     height = bounds.height,
1681     borderSide,
1682     bx,
1683     by,
1684     bw,
1685     bh,
1686     borderArgs,
1687     // http://www.w3.org/TR/css3-background/#the-border-radius
1688     borderRadius = getBorderRadiusData(element),
1689     borderPoints = calculateCurvePoints(bounds, borderRadius, borders),
1690     borderData = {
1691       clip: getBorderClip(element, borderPoints, borders, borderRadius, bounds),
1692       borders: []
1693     };
1694 
1695     for (borderSide = 0; borderSide < 4; borderSide++) {
1696 
1697       if (borders[borderSide].width > 0) {
1698         bx = x;
1699         by = y;
1700         bw = width;
1701         bh = height - (borders[2].width);
1702 
1703         switch(borderSide) {
1704           case 0:
1705             // top border
1706             bh = borders[0].width;
1707 
1708             borderArgs = drawSide({
1709               c1: [bx, by],
1710               c2: [bx + bw, by],
1711               c3: [bx + bw - borders[1].width, by + bh],
1712               c4: [bx + borders[3].width, by + bh]
1713             }, borderRadius[0], borderRadius[1],
1714             borderPoints.topLeftOuter, borderPoints.topLeftInner, borderPoints.topRightOuter, borderPoints.topRightInner);
1715             break;
1716           case 1:
1717             // right border
1718             bx = x + width - (borders[1].width);
1719             bw = borders[1].width;
1720 
1721             borderArgs = drawSide({
1722               c1: [bx + bw, by],
1723               c2: [bx + bw, by + bh + borders[2].width],
1724               c3: [bx, by + bh],
1725               c4: [bx, by + borders[0].width]
1726             }, borderRadius[1], borderRadius[2],
1727             borderPoints.topRightOuter, borderPoints.topRightInner, borderPoints.bottomRightOuter, borderPoints.bottomRightInner);
1728             break;
1729           case 2:
1730             // bottom border
1731             by = (by + height) - (borders[2].width);
1732             bh = borders[2].width;
1733 
1734             borderArgs = drawSide({
1735               c1: [bx + bw, by + bh],
1736               c2: [bx, by + bh],
1737               c3: [bx + borders[3].width, by],
1738               c4: [bx + bw - borders[3].width, by]
1739             }, borderRadius[2], borderRadius[3],
1740             borderPoints.bottomRightOuter, borderPoints.bottomRightInner, borderPoints.bottomLeftOuter, borderPoints.bottomLeftInner);
1741             break;
1742           case 3:
1743             // left border
1744             bw = borders[3].width;
1745 
1746             borderArgs = drawSide({
1747               c1: [bx, by + bh + borders[2].width],
1748               c2: [bx, by],
1749               c3: [bx + bw, by + borders[0].width],
1750               c4: [bx + bw, by + bh]
1751             }, borderRadius[3], borderRadius[0],
1752             borderPoints.bottomLeftOuter, borderPoints.bottomLeftInner, borderPoints.topLeftOuter, borderPoints.topLeftInner);
1753             break;
1754         }
1755 
1756         borderData.borders.push({
1757           args: borderArgs,
1758           color: borders[borderSide].color
1759         });
1760 
1761       }
1762     }
1763 
1764     return borderData;
1765   }
1766 
1767   function createShape(ctx, args) {
1768     var shape = ctx.drawShape();
1769     args.forEach(function(border, index) {
1770       shape[(index === 0) ? "moveTo" : border[0] + "To" ].apply(null, border.slice(1));
1771     });
1772     return shape;
1773   }
1774 
1775   function renderBorders(ctx, borderArgs, color) {
1776     if (color !== "transparent") {
1777       ctx.setVariable( "fillStyle", color);
1778       createShape(ctx, borderArgs);
1779       ctx.fill();
1780       numDraws+=1;
1781     }
1782   }
1783 
1784   function renderFormValue (el, bounds, stack){
1785 
1786     var valueWrap = doc.createElement('valuewrap'),
1787     cssPropertyArray = ['lineHeight','textAlign','fontFamily','color','fontSize','paddingLeft','paddingTop','width','height','border','borderLeftWidth','borderTopWidth'],
1788     textValue,
1789     textNode;
1790 
1791     cssPropertyArray.forEach(function(property) {
1792       try {
1793         valueWrap.style[property] = getCSS(el, property);
1794       } catch(e) {
1795         // Older IE has issues with "border"
1796         Util.log("html2canvas: Parse: Exception caught in renderFormValue: " + e.message);
1797       }
1798     });
1799 
1800     valueWrap.style.borderColor = "black";
1801     valueWrap.style.borderStyle = "solid";
1802     valueWrap.style.display = "block";
1803     valueWrap.style.position = "absolute";
1804 
1805     if (/^(submit|reset|button|text|password)$/.test(el.type) || el.nodeName === "SELECT"){
1806       valueWrap.style.lineHeight = getCSS(el, "height");
1807     }
1808 
1809     valueWrap.style.top = bounds.top + "px";
1810     valueWrap.style.left = bounds.left + "px";
1811 
1812     textValue = (el.nodeName === "SELECT") ? (el.options[el.selectedIndex] || 0).text : el.value;
1813     if(!textValue) {
1814       textValue = el.placeholder;
1815     }
1816 
1817     textNode = doc.createTextNode(textValue);
1818 
1819     valueWrap.appendChild(textNode);
1820     body.appendChild(valueWrap);
1821 
1822     renderText(el, textNode, stack);
1823     body.removeChild(valueWrap);
1824   }
1825 
1826   function drawImage (ctx) {
1827     ctx.drawImage.apply(ctx, Array.prototype.slice.call(arguments, 1));
1828     numDraws+=1;
1829   }
1830 
1831   function getPseudoElement(el, which) {
1832     var elStyle = window.getComputedStyle(el, which);
1833     if(!elStyle || !elStyle.content || elStyle.content === "none" || elStyle.content === "-moz-alt-content" || elStyle.display === "none") {
1834       return;
1835     }
1836     var content = elStyle.content + '',
1837     first = content.substr( 0, 1 );
1838     //strips quotes
1839     if(first === content.substr( content.length - 1 ) && first.match(/'|"/)) {
1840       content = content.substr( 1, content.length - 2 );
1841     }
1842 
1843     var isImage = content.substr( 0, 3 ) === 'url',
1844     elps = document.createElement( isImage ? 'img' : 'span' );
1845 
1846     elps.className = pseudoHide + "-before " + pseudoHide + "-after";
1847 
1848     Object.keys(elStyle).filter(indexedProperty).forEach(function(prop) {
1849       // Prevent assigning of read only CSS Rules, ex. length, parentRule
1850       try {
1851         elps.style[prop] = elStyle[prop];
1852       } catch (e) {
1853         Util.log(['Tried to assign readonly property ', prop, 'Error:', e]);
1854       }
1855     });
1856 
1857     if(isImage) {
1858       elps.src = Util.parseBackgroundImage(content)[0].args[0];
1859     } else {
1860       elps.innerHTML = content;
1861     }
1862     return elps;
1863   }
1864 
1865   function indexedProperty(property) {
1866     return (isNaN(window.parseInt(property, 10)));
1867   }
1868 
1869   function injectPseudoElements(el, stack) {
1870     var before = getPseudoElement(el, ':before'),
1871     after = getPseudoElement(el, ':after');
1872     if(!before && !after) {
1873       return;
1874     }
1875 
1876     if(before) {
1877       el.className += " " + pseudoHide + "-before";
1878       el.parentNode.insertBefore(before, el);
1879       parseElement(before, stack, true);
1880       el.parentNode.removeChild(before);
1881       el.className = el.className.replace(pseudoHide + "-before", "").trim();
1882     }
1883 
1884     if (after) {
1885       el.className += " " + pseudoHide + "-after";
1886       el.appendChild(after);
1887       parseElement(after, stack, true);
1888       el.removeChild(after);
1889       el.className = el.className.replace(pseudoHide + "-after", "").trim();
1890     }
1891 
1892   }
1893 
1894   function renderBackgroundRepeat(ctx, image, backgroundPosition, bounds) {
1895     var offsetX = Math.round(bounds.left + backgroundPosition.left),
1896     offsetY = Math.round(bounds.top + backgroundPosition.top);
1897 
1898     ctx.createPattern(image);
1899     ctx.translate(offsetX, offsetY);
1900     ctx.fill();
1901     ctx.translate(-offsetX, -offsetY);
1902   }
1903 
1904   function backgroundRepeatShape(ctx, image, backgroundPosition, bounds, left, top, width, height) {
1905     var args = [];
1906     args.push(["line", Math.round(left), Math.round(top)]);
1907     args.push(["line", Math.round(left + width), Math.round(top)]);
1908     args.push(["line", Math.round(left + width), Math.round(height + top)]);
1909     args.push(["line", Math.round(left), Math.round(height + top)]);
1910     createShape(ctx, args);
1911     ctx.save();
1912     ctx.clip();
1913     renderBackgroundRepeat(ctx, image, backgroundPosition, bounds);
1914     ctx.restore();
1915   }
1916 
1917   function renderBackgroundColor(ctx, backgroundBounds, bgcolor) {
1918     renderRect(
1919       ctx,
1920       backgroundBounds.left,
1921       backgroundBounds.top,
1922       backgroundBounds.width,
1923       backgroundBounds.height,
1924       bgcolor
1925       );
1926   }
1927 
1928   function renderBackgroundRepeating(el, bounds, ctx, image, imageIndex) {
1929     var backgroundSize = Util.BackgroundSize(el, bounds, image, imageIndex),
1930     backgroundPosition = Util.BackgroundPosition(el, bounds, image, imageIndex, backgroundSize),
1931     backgroundRepeat = getCSS(el, "backgroundRepeat").split(",").map(Util.trimText);
1932 
1933     image = resizeImage(image, backgroundSize);
1934 
1935     backgroundRepeat = backgroundRepeat[imageIndex] || backgroundRepeat[0];
1936 
1937     switch (backgroundRepeat) {
1938       case "repeat-x":
1939         backgroundRepeatShape(ctx, image, backgroundPosition, bounds,
1940           bounds.left, bounds.top + backgroundPosition.top, 99999, image.height);
1941         break;
1942 
1943       case "repeat-y":
1944         backgroundRepeatShape(ctx, image, backgroundPosition, bounds,
1945           bounds.left + backgroundPosition.left, bounds.top, image.width, 99999);
1946         break;
1947 
1948       case "no-repeat":
1949         backgroundRepeatShape(ctx, image, backgroundPosition, bounds,
1950           bounds.left + backgroundPosition.left, bounds.top + backgroundPosition.top, image.width, image.height);
1951         break;
1952 
1953       default:
1954         renderBackgroundRepeat(ctx, image, backgroundPosition, {
1955           top: bounds.top,
1956           left: bounds.left,
1957           width: image.width,
1958           height: image.height
1959         });
1960         break;
1961     }
1962   }
1963 
1964   function renderBackgroundImage(element, bounds, ctx) {
1965     var backgroundImage = getCSS(element, "backgroundImage"),
1966     backgroundImages = Util.parseBackgroundImage(backgroundImage),
1967     image,
1968     imageIndex = backgroundImages.length;
1969 
1970     while(imageIndex--) {
1971       backgroundImage = backgroundImages[imageIndex];
1972 
1973       if (!backgroundImage.args || backgroundImage.args.length === 0) {
1974         continue;
1975       }
1976 
1977       var key = backgroundImage.method === 'url' ?
1978       backgroundImage.args[0] :
1979       backgroundImage.value;
1980 
1981       image = loadImage(key);
1982 
1983       // TODO add support for background-origin
1984       if (image) {
1985         renderBackgroundRepeating(element, bounds, ctx, image, imageIndex);
1986       } else {
1987         Util.log("html2canvas: Error loading background:", backgroundImage);
1988       }
1989     }
1990   }
1991 
1992   function resizeImage(image, bounds) {
1993     if(image.width === bounds.width && image.height === bounds.height) {
1994       return image;
1995     }
1996 
1997     var ctx, canvas = doc.createElement('canvas');
1998     canvas.width = bounds.width;
1999     canvas.height = bounds.height;
2000     ctx = canvas.getContext("2d");
2001     drawImage(ctx, image, 0, 0, image.width, image.height, 0, 0, bounds.width, bounds.height );
2002     return canvas;
2003   }
2004 
2005   function setOpacity(ctx, element, parentStack) {
2006     return ctx.setVariable("globalAlpha", getCSS(element, "opacity") * ((parentStack) ? parentStack.opacity : 1));
2007   }
2008 
2009   function removePx(str) {
2010     return str.replace("px", "");
2011   }
2012 
2013   var transformRegExp = /(matrix)\((.+)\)/;
2014 
2015   function getTransform(element, parentStack) {
2016     var transform = getCSS(element, "transform") || getCSS(element, "-webkit-transform") || getCSS(element, "-moz-transform") || getCSS(element, "-ms-transform") || getCSS(element, "-o-transform");
2017     var transformOrigin = getCSS(element, "transform-origin") || getCSS(element, "-webkit-transform-origin") || getCSS(element, "-moz-transform-origin") || getCSS(element, "-ms-transform-origin") || getCSS(element, "-o-transform-origin") || "0px 0px";
2018 
2019     transformOrigin = transformOrigin.split(" ").map(removePx).map(Util.asFloat);
2020 
2021     var matrix;
2022     if (transform && transform !== "none") {
2023       var match = transform.match(transformRegExp);
2024       if (match) {
2025         switch(match[1]) {
2026           case "matrix":
2027             matrix = match[2].split(",").map(Util.trimText).map(Util.asFloat);
2028             break;
2029         }
2030       }
2031     }
2032 
2033     return {
2034       origin: transformOrigin,
2035       matrix: matrix
2036     };
2037   }
2038 
2039   function createStack(element, parentStack, bounds, transform) {
2040     var ctx = h2cRenderContext((!parentStack) ? documentWidth() : bounds.width , (!parentStack) ? documentHeight() : bounds.height),
2041     stack = {
2042       ctx: ctx,
2043       opacity: setOpacity(ctx, element, parentStack),
2044       cssPosition: getCSS(element, "position"),
2045       borders: getBorderData(element),
2046       transform: transform,
2047       clip: (parentStack && parentStack.clip) ? Util.Extend( {}, parentStack.clip ) : null
2048     };
2049 
2050     setZ(element, stack, parentStack);
2051 
2052     // TODO correct overflow for absolute content residing under a static position
2053     if (options.useOverflow === true && /(hidden|scroll|auto)/.test(getCSS(element, "overflow")) === true && /(BODY)/i.test(element.nodeName) === false){
2054       stack.clip = (stack.clip) ? clipBounds(stack.clip, bounds) : bounds;
2055     }
2056 
2057     return stack;
2058   }
2059 
2060   function getBackgroundBounds(borders, bounds, clip) {
2061     var backgroundBounds = {
2062       left: bounds.left + borders[3].width,
2063       top: bounds.top + borders[0].width,
2064       width: bounds.width - (borders[1].width + borders[3].width),
2065       height: bounds.height - (borders[0].width + borders[2].width)
2066     };
2067 
2068     if (clip) {
2069       backgroundBounds = clipBounds(backgroundBounds, clip);
2070     }
2071 
2072     return backgroundBounds;
2073   }
2074 
2075   function getBounds(element, transform) {
2076     var bounds = (transform.matrix) ? Util.OffsetBounds(element) : Util.Bounds(element);
2077     transform.origin[0] += bounds.left;
2078     transform.origin[1] += bounds.top;
2079     return bounds;
2080   }
2081 
2082   function renderElement(element, parentStack, pseudoElement, ignoreBackground) {
2083     var transform = getTransform(element, parentStack),
2084     bounds = getBounds(element, transform),
2085     image,
2086     stack = createStack(element, parentStack, bounds, transform),
2087     borders = stack.borders,
2088     ctx = stack.ctx,
2089     backgroundBounds = getBackgroundBounds(borders, bounds, stack.clip),
2090     borderData = parseBorders(element, bounds, borders),
2091     backgroundColor = (ignoreElementsRegExp.test(element.nodeName)) ? "#efefef" : getCSS(element, "backgroundColor");
2092 
2093 
2094     createShape(ctx, borderData.clip);
2095 
2096     ctx.save();
2097     ctx.clip();
2098 
2099     if (backgroundBounds.height > 0 && backgroundBounds.width > 0 && !ignoreBackground) {
2100       renderBackgroundColor(ctx, bounds, backgroundColor);
2101       renderBackgroundImage(element, backgroundBounds, ctx);
2102     } else if (ignoreBackground) {
2103       stack.backgroundColor =  backgroundColor;
2104     }
2105 
2106     ctx.restore();
2107 
2108     borderData.borders.forEach(function(border) {
2109       renderBorders(ctx, border.args, border.color);
2110     });
2111 
2112     if (!pseudoElement) {
2113       injectPseudoElements(element, stack);
2114     }
2115 
2116     switch(element.nodeName){
2117       case "IMG":
2118         if ((image = loadImage(element.getAttribute('src')))) {
2119           renderImage(ctx, element, image, bounds, borders);
2120         } else {
2121           Util.log("html2canvas: Error loading <img>:" + element.getAttribute('src'));
2122         }
2123         break;
2124       case "INPUT":
2125         // TODO add all relevant type's, i.e. HTML5 new stuff
2126         // todo add support for placeholder attribute for browsers which support it
2127         if (/^(text|url|email|submit|button|reset)$/.test(element.type) && (element.value || element.placeholder || "").length > 0){
2128           renderFormValue(element, bounds, stack);
2129         }
2130         break;
2131       case "TEXTAREA":
2132         if ((element.value || element.placeholder || "").length > 0){
2133           renderFormValue(element, bounds, stack);
2134         }
2135         break;
2136       case "SELECT":
2137         if ((element.options||element.placeholder || "").length > 0){
2138           renderFormValue(element, bounds, stack);
2139         }
2140         break;
2141       case "LI":
2142         renderListItem(element, stack, backgroundBounds);
2143         break;
2144       case "CANVAS":
2145         renderImage(ctx, element, element, bounds, borders);
2146         break;
2147     }
2148 
2149     return stack;
2150   }
2151 
2152   function isElementVisible(element) {
2153     return (getCSS(element, 'display') !== "none" && getCSS(element, 'visibility') !== "hidden" && !element.hasAttribute("data-html2canvas-ignore"));
2154   }
2155 
2156   function parseElement (element, stack, pseudoElement) {
2157     if (isElementVisible(element)) {
2158       stack = renderElement(element, stack, pseudoElement, false) || stack;
2159       if (!ignoreElementsRegExp.test(element.nodeName)) {
2160         parseChildren(element, stack, pseudoElement);
2161       }
2162     }
2163   }
2164 
2165   function parseChildren(element, stack, pseudoElement) {
2166     Util.Children(element).forEach(function(node) {
2167       if (node.nodeType === node.ELEMENT_NODE) {
2168         parseElement(node, stack, pseudoElement);
2169       } else if (node.nodeType === node.TEXT_NODE) {
2170         renderText(element, node, stack);
2171       }
2172     });
2173   }
2174 
2175   function init() {
2176     var background = getCSS(document.documentElement, "backgroundColor"),
2177       transparentBackground = (Util.isTransparent(background) && element === document.body),
2178       stack = renderElement(element, null, false, transparentBackground);
2179     parseChildren(element, stack);
2180 
2181     if (transparentBackground) {
2182       background = stack.backgroundColor;
2183     }
2184 
2185     body.removeChild(hidePseudoElements);
2186     return {
2187       backgroundColor: background,
2188       stack: stack
2189     };
2190   }
2191 
2192   return init();
2193 };
2194 
2195 function h2czContext(zindex) {
2196   return {
2197     zindex: zindex,
2198     children: []
2199   };
2200 }
2201 
2202 _html2canvas.Preload = function( options ) {
2203 
2204   var images = {
2205     numLoaded: 0,   // also failed are counted here
2206     numFailed: 0,
2207     numTotal: 0,
2208     cleanupDone: false
2209   },
2210   pageOrigin,
2211   Util = _html2canvas.Util,
2212   methods,
2213   i,
2214   count = 0,
2215   element = options.elements[0] || document.body,
2216   doc = element.ownerDocument,
2217   domImages = element.getElementsByTagName('img'), // Fetch images of the present element only
2218   imgLen = domImages.length,
2219   link = doc.createElement("a"),
2220   supportCORS = (function( img ){
2221     return (img.crossOrigin !== undefined);
2222   })(new Image()),
2223   timeoutTimer;
2224 
2225   link.href = window.location.href;
2226   pageOrigin  = link.protocol + link.host;
2227 
2228   function isSameOrigin(url){
2229     link.href = url;
2230     link.href = link.href; // YES, BELIEVE IT OR NOT, that is required for IE9 - http://jsfiddle.net/niklasvh/2e48b/
2231     var origin = link.protocol + link.host;
2232     return (origin === pageOrigin);
2233   }
2234 
2235   function start(){
2236     Util.log("html2canvas: start: images: " + images.numLoaded + " / " + images.numTotal + " (failed: " + images.numFailed + ")");
2237     if (!images.firstRun && images.numLoaded >= images.numTotal){
2238       Util.log("Finished loading images: # " + images.numTotal + " (failed: " + images.numFailed + ")");
2239 
2240       if (typeof options.complete === "function"){
2241         options.complete(images);
2242       }
2243 
2244     }
2245   }
2246 
2247   // TODO modify proxy to serve images with CORS enabled, where available
2248   function proxyGetImage(url, img, imageObj){
2249     var callback_name,
2250     scriptUrl = options.proxy,
2251     script;
2252 
2253     link.href = url;
2254     url = link.href; // work around for pages with base href="" set - WARNING: this may change the url
2255 
2256     callback_name = 'html2canvas_' + (count++);
2257     imageObj.callbackname = callback_name;
2258 
2259     if (scriptUrl.indexOf("?") > -1) {
2260       scriptUrl += "&";
2261     } else {
2262       scriptUrl += "?";
2263     }
2264     scriptUrl += 'url=' + encodeURIComponent(url) + '&callback=' + callback_name;
2265     script = doc.createElement("script");
2266 
2267     window[callback_name] = function(a){
2268       if (a.substring(0,6) === "error:"){
2269         imageObj.succeeded = false;
2270         images.numLoaded++;
2271         images.numFailed++;
2272         start();
2273       } else {
2274         setImageLoadHandlers(img, imageObj);
2275         img.src = a;
2276       }
2277       window[callback_name] = undefined; // to work with IE<9  // NOTE: that the undefined callback property-name still exists on the window object (for IE<9)
2278       try {
2279         delete window[callback_name];  // for all browser that support this
2280       } catch(ex) {}
2281       script.parentNode.removeChild(script);
2282       script = null;
2283       delete imageObj.script;
2284       delete imageObj.callbackname;
2285     };
2286 
2287     script.setAttribute("type", "text/javascript");
2288     script.setAttribute("src", scriptUrl);
2289     imageObj.script = script;
2290     window.document.body.appendChild(script);
2291 
2292   }
2293 
2294   function loadPseudoElement(element, type) {
2295     var style = window.getComputedStyle(element, type),
2296     content = style.content;
2297     if (content.substr(0, 3) === 'url') {
2298       methods.loadImage(_html2canvas.Util.parseBackgroundImage(content)[0].args[0]);
2299     }
2300     loadBackgroundImages(style.backgroundImage, element);
2301   }
2302 
2303   function loadPseudoElementImages(element) {
2304     loadPseudoElement(element, ":before");
2305     loadPseudoElement(element, ":after");
2306   }
2307 
2308   function loadGradientImage(backgroundImage, bounds) {
2309     var img = _html2canvas.Generate.Gradient(backgroundImage, bounds);
2310 
2311     if (img !== undefined){
2312       images[backgroundImage] = {
2313         img: img,
2314         succeeded: true
2315       };
2316       images.numTotal++;
2317       images.numLoaded++;
2318       start();
2319     }
2320   }
2321 
2322   function invalidBackgrounds(background_image) {
2323     return (background_image && background_image.method && background_image.args && background_image.args.length > 0 );
2324   }
2325 
2326   function loadBackgroundImages(background_image, el) {
2327     var bounds;
2328 
2329     _html2canvas.Util.parseBackgroundImage(background_image).filter(invalidBackgrounds).forEach(function(background_image) {
2330       if (background_image.method === 'url') {
2331         methods.loadImage(background_image.args[0]);
2332       } else if(background_image.method.match(/\-?gradient$/)) {
2333         if(bounds === undefined) {
2334           bounds = _html2canvas.Util.Bounds(el);
2335         }
2336         loadGradientImage(background_image.value, bounds);
2337       }
2338     });
2339   }
2340 
2341   function getImages (el) {
2342     var elNodeType = false;
2343 
2344     // Firefox fails with permission denied on pages with iframes
2345     try {
2346       Util.Children(el).forEach(getImages);
2347     }
2348     catch( e ) {}
2349 
2350     try {
2351       elNodeType = el.nodeType;
2352     } catch (ex) {
2353       elNodeType = false;
2354       Util.log("html2canvas: failed to access some element's nodeType - Exception: " + ex.message);
2355     }
2356 
2357     if (elNodeType === 1 || elNodeType === undefined) {
2358       loadPseudoElementImages(el);
2359       try {
2360         loadBackgroundImages(Util.getCSS(el, 'backgroundImage'), el);
2361       } catch(e) {
2362         Util.log("html2canvas: failed to get background-image - Exception: " + e.message);
2363       }
2364       loadBackgroundImages(el);
2365     }
2366   }
2367 
2368   function setImageLoadHandlers(img, imageObj) {
2369     img.onload = function() {
2370       if ( imageObj.timer !== undefined ) {
2371         // CORS succeeded
2372         window.clearTimeout( imageObj.timer );
2373       }
2374 
2375       images.numLoaded++;
2376       imageObj.succeeded = true;
2377       img.onerror = img.onload = null;
2378       start();
2379     };
2380     img.onerror = function() {
2381       if (img.crossOrigin === "anonymous") {
2382         // CORS failed
2383         window.clearTimeout( imageObj.timer );
2384 
2385         // let's try with proxy instead
2386         if ( options.proxy ) {
2387           var src = img.src;
2388           img = new Image();
2389           imageObj.img = img;
2390           img.src = src;
2391 
2392           proxyGetImage( img.src, img, imageObj );
2393           return;
2394         }
2395       }
2396 
2397       images.numLoaded++;
2398       images.numFailed++;
2399       imageObj.succeeded = false;
2400       img.onerror = img.onload = null;
2401       start();
2402     };
2403   }
2404 
2405   methods = {
2406     loadImage: function( src ) {
2407       var img, imageObj;
2408       if ( src && images[src] === undefined ) {
2409         img = new Image();
2410         if ( src.match(/data:image\/.*;base64,/i) ) {
2411           img.src = src.replace(/url\(['"]{0,}|['"]{0,}\)$/ig, '');
2412           imageObj = images[src] = {
2413             img: img
2414           };
2415           images.numTotal++;
2416           setImageLoadHandlers(img, imageObj);
2417         } else if ( isSameOrigin( src ) || options.allowTaint ===  true ) {
2418           imageObj = images[src] = {
2419             img: img
2420           };
2421           images.numTotal++;
2422           setImageLoadHandlers(img, imageObj);
2423           img.src = src;
2424         } else if ( supportCORS && !options.allowTaint && options.useCORS ) {
2425           // attempt to load with CORS
2426 
2427           img.crossOrigin = "anonymous";
2428           imageObj = images[src] = {
2429             img: img
2430           };
2431           images.numTotal++;
2432           setImageLoadHandlers(img, imageObj);
2433           img.src = src;
2434         } else if ( options.proxy ) {
2435           imageObj = images[src] = {
2436             img: img
2437           };
2438           images.numTotal++;
2439           proxyGetImage( src, img, imageObj );
2440         }
2441       }
2442 
2443     },
2444     cleanupDOM: function(cause) {
2445       var img, src;
2446       if (!images.cleanupDone) {
2447         if (cause && typeof cause === "string") {
2448           Util.log("html2canvas: Cleanup because: " + cause);
2449         } else {
2450           Util.log("html2canvas: Cleanup after timeout: " + options.timeout + " ms.");
2451         }
2452 
2453         for (src in images) {
2454           if (images.hasOwnProperty(src)) {
2455             img = images[src];
2456             if (typeof img === "object" && img.callbackname && img.succeeded === undefined) {
2457               // cancel proxy image request
2458               window[img.callbackname] = undefined; // to work with IE<9  // NOTE: that the undefined callback property-name still exists on the window object (for IE<9)
2459               try {
2460                 delete window[img.callbackname];  // for all browser that support this
2461               } catch(ex) {}
2462               if (img.script && img.script.parentNode) {
2463                 img.script.setAttribute("src", "about:blank");  // try to cancel running request
2464                 img.script.parentNode.removeChild(img.script);
2465               }
2466               images.numLoaded++;
2467               images.numFailed++;
2468               Util.log("html2canvas: Cleaned up failed img: '" + src + "' Steps: " + images.numLoaded + " / " + images.numTotal);
2469             }
2470           }
2471         }
2472 
2473         // cancel any pending requests
2474         if(window.stop !== undefined) {
2475           window.stop();
2476         } else if(document.execCommand !== undefined) {
2477           document.execCommand("Stop", false);
2478         }
2479         if (document.close !== undefined) {
2480           document.close();
2481         }
2482         images.cleanupDone = true;
2483         if (!(cause && typeof cause === "string")) {
2484           start();
2485         }
2486       }
2487     },
2488 
2489     renderingDone: function() {
2490       if (timeoutTimer) {
2491         window.clearTimeout(timeoutTimer);
2492       }
2493     }
2494   };
2495 
2496   if (options.timeout > 0) {
2497     timeoutTimer = window.setTimeout(methods.cleanupDOM, options.timeout);
2498   }
2499 
2500   Util.log('html2canvas: Preload starts: finding background-images');
2501   images.firstRun = true;
2502 
2503   getImages(element);
2504 
2505   Util.log('html2canvas: Preload: Finding images');
2506   // load <img> images
2507   for (i = 0; i < imgLen; i+=1){
2508     methods.loadImage( domImages[i].getAttribute( "src" ) );
2509   }
2510 
2511   images.firstRun = false;
2512   Util.log('html2canvas: Preload: Done.');
2513   if (images.numTotal === images.numLoaded) {
2514     start();
2515   }
2516 
2517   return methods;
2518 };
2519 
2520 _html2canvas.Renderer = function(parseQueue, options){
2521 
2522   // http://www.w3.org/TR/CSS21/zindex.html
2523   function createRenderQueue(parseQueue) {
2524     var queue = [],
2525     rootContext;
2526 
2527     rootContext = (function buildStackingContext(rootNode) {
2528       var rootContext = {};
2529       function insert(context, node, specialParent) {
2530         var zi = (node.zIndex.zindex === 'auto') ? 0 : Number(node.zIndex.zindex),
2531         contextForChildren = context, // the stacking context for children
2532         isPositioned = node.zIndex.isPositioned,
2533         isFloated = node.zIndex.isFloated,
2534         stub = {node: node},
2535         childrenDest = specialParent; // where children without z-index should be pushed into
2536 
2537         if (node.zIndex.ownStacking) {
2538           // '!' comes before numbers in sorted array
2539           contextForChildren = stub.context = { '!': [{node:node, children: []}]};
2540           childrenDest = undefined;
2541         } else if (isPositioned || isFloated) {
2542           childrenDest = stub.children = [];
2543         }
2544 
2545         if (zi === 0 && specialParent) {
2546           specialParent.push(stub);
2547         } else {
2548           if (!context[zi]) { context[zi] = []; }
2549           context[zi].push(stub);
2550         }
2551 
2552         node.zIndex.children.forEach(function(childNode) {
2553           insert(contextForChildren, childNode, childrenDest);
2554         });
2555       }
2556       insert(rootContext, rootNode);
2557       return rootContext;
2558     })(parseQueue);
2559 
2560     function sortZ(context) {
2561       Object.keys(context).sort().forEach(function(zi) {
2562         var nonPositioned = [],
2563         floated = [],
2564         positioned = [],
2565         list = [];
2566 
2567         // positioned after static
2568         context[zi].forEach(function(v) {
2569           if (v.node.zIndex.isPositioned || v.node.zIndex.opacity < 1) {
2570             // http://www.w3.org/TR/css3-color/#transparency
2571             // non-positioned element with opactiy < 1 should be stacked as if it were a positioned element with ‘z-index: 0’ and ‘opacity: 1’.
2572             positioned.push(v);
2573           } else if (v.node.zIndex.isFloated) {
2574             floated.push(v);
2575           } else {
2576             nonPositioned.push(v);
2577           }
2578         });
2579 
2580         (function walk(arr) {
2581           arr.forEach(function(v) {
2582             list.push(v);
2583             if (v.children) { walk(v.children); }
2584           });
2585         })(nonPositioned.concat(floated, positioned));
2586 
2587         list.forEach(function(v) {
2588           if (v.context) {
2589             sortZ(v.context);
2590           } else {
2591             queue.push(v.node);
2592           }
2593         });
2594       });
2595     }
2596 
2597     sortZ(rootContext);
2598 
2599     return queue;
2600   }
2601 
2602   function getRenderer(rendererName) {
2603     var renderer;
2604 
2605     if (typeof options.renderer === "string" && _html2canvas.Renderer[rendererName] !== undefined) {
2606       renderer = _html2canvas.Renderer[rendererName](options);
2607     } else if (typeof rendererName === "function") {
2608       renderer = rendererName(options);
2609     } else {
2610       throw new Error("Unknown renderer");
2611     }
2612 
2613     if ( typeof renderer !== "function" ) {
2614       throw new Error("Invalid renderer defined");
2615     }
2616     return renderer;
2617   }
2618 
2619   return getRenderer(options.renderer)(parseQueue, options, document, createRenderQueue(parseQueue.stack), _html2canvas);
2620 };
2621 
2622 _html2canvas.Util.Support = function (options, doc) {
2623 
2624   function supportSVGRendering() {
2625     var img = new Image(),
2626     canvas = doc.createElement("canvas"),
2627     ctx = (canvas.getContext === undefined) ? false : canvas.getContext("2d");
2628     if (ctx === false) {
2629       return false;
2630     }
2631     canvas.width = canvas.height = 10;
2632     img.src = [
2633     "data:image/svg+xml,",
2634     "<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10'>",
2635     "<foreignObject width='10' height='10'>",
2636     "<div xmlns='http://www.w3.org/1999/xhtml' style='width:10;height:10;'>",
2637     "sup",
2638     "</div>",
2639     "</foreignObject>",
2640     "</svg>"
2641     ].join("");
2642     try {
2643       ctx.drawImage(img, 0, 0);
2644       canvas.toDataURL();
2645     } catch(e) {
2646       return false;
2647     }
2648     _html2canvas.Util.log('html2canvas: Parse: SVG powered rendering available');
2649     return true;
2650   }
2651 
2652   // Test whether we can use ranges to measure bounding boxes
2653   // Opera doesn't provide valid bounds.height/bottom even though it supports the method.
2654 
2655   function supportRangeBounds() {
2656     var r, testElement, rangeBounds, rangeHeight, support = false;
2657 
2658     if (doc.createRange) {
2659       r = doc.createRange();
2660       if (r.getBoundingClientRect) {
2661         testElement = doc.createElement('boundtest');
2662         testElement.style.height = "123px";
2663         testElement.style.display = "block";
2664         doc.body.appendChild(testElement);
2665 
2666         r.selectNode(testElement);
2667         rangeBounds = r.getBoundingClientRect();
2668         rangeHeight = rangeBounds.height;
2669 
2670         if (rangeHeight === 123) {
2671           support = true;
2672         }
2673         doc.body.removeChild(testElement);
2674       }
2675     }
2676 
2677     return support;
2678   }
2679 
2680   return {
2681     rangeBounds: supportRangeBounds(),
2682     svgRendering: options.svgRendering && supportSVGRendering()
2683   };
2684 };
2685 window.html2canvas = function(elements, opts) {
2686   elements = (elements.length) ? elements : [elements];
2687   var queue,
2688   canvas,
2689   options = {
2690     // general
2691     logging: false,
2692     elements: elements,
2693     background: "#fff",
2694 
2695     // preload options
2696     proxy: null,
2697     timeout: 0,    // no timeout
2698     useCORS: false, // try to load images as CORS (where available), before falling back to proxy
2699     allowTaint: false, // whether to allow images to taint the canvas, won't need proxy if set to true
2700 
2701     // parse options
2702     svgRendering: false, // use svg powered rendering where available (FF11+)
2703     ignoreElements: "IFRAME|OBJECT|PARAM",
2704     useOverflow: true,
2705     letterRendering: false,
2706     chinese: false,
2707 
2708     // render options
2709 
2710     width: null,
2711     height: null,
2712     taintTest: true, // do a taint test with all images before applying to canvas
2713     renderer: "Canvas"
2714   };
2715 
2716   options = _html2canvas.Util.Extend(opts, options);
2717 
2718   _html2canvas.logging = options.logging;
2719   options.complete = function( images ) {
2720 
2721     if (typeof options.onpreloaded === "function") {
2722       if ( options.onpreloaded( images ) === false ) {
2723         return;
2724       }
2725     }
2726     queue = _html2canvas.Parse( images, options );
2727 
2728     if (typeof options.onparsed === "function") {
2729       if ( options.onparsed( queue ) === false ) {
2730         return;
2731       }
2732     }
2733 
2734     canvas = _html2canvas.Renderer( queue, options );
2735 
2736     if (typeof options.onrendered === "function") {
2737       options.onrendered( canvas );
2738     }
2739 
2740 
2741   };
2742 
2743   // for pages without images, we still want this to be async, i.e. return methods before executing
2744   window.setTimeout( function(){
2745     _html2canvas.Preload( options );
2746   }, 0 );
2747 
2748   return {
2749     render: function( queue, opts ) {
2750       return _html2canvas.Renderer( queue, _html2canvas.Util.Extend(opts, options) );
2751     },
2752     parse: function( images, opts ) {
2753       return _html2canvas.Parse( images, _html2canvas.Util.Extend(opts, options) );
2754     },
2755     preload: function( opts ) {
2756       return _html2canvas.Preload( _html2canvas.Util.Extend(opts, options) );
2757     },
2758     log: _html2canvas.Util.log
2759   };
2760 };
2761 
2762 window.html2canvas.log = _html2canvas.Util.log; // for renderers
2763 window.html2canvas.Renderer = {
2764   Canvas: undefined // We are assuming this will be used
2765 };
2766 _html2canvas.Renderer.Canvas = function(options) {
2767   options = options || {};
2768 
2769   var doc = document,
2770   safeImages = [],
2771   testCanvas = document.createElement("canvas"),
2772   testctx = testCanvas.getContext("2d"),
2773   Util = _html2canvas.Util,
2774   canvas = options.canvas || doc.createElement('canvas');
2775 
2776   function createShape(ctx, args) {
2777     ctx.beginPath();
2778     args.forEach(function(arg) {
2779       ctx[arg.name].apply(ctx, arg['arguments']);
2780     });
2781     ctx.closePath();
2782   }
2783 
2784   function safeImage(item) {
2785     if (safeImages.indexOf(item['arguments'][0].src ) === -1) {
2786       testctx.drawImage(item['arguments'][0], 0, 0);
2787       try {
2788         testctx.getImageData(0, 0, 1, 1);
2789       } catch(e) {
2790         testCanvas = doc.createElement("canvas");
2791         testctx = testCanvas.getContext("2d");
2792         return false;
2793       }
2794       safeImages.push(item['arguments'][0].src);
2795     }
2796     return true;
2797   }
2798 
2799   function renderItem(ctx, item) {
2800     switch(item.type){
2801       case "variable":
2802         ctx[item.name] = item['arguments'];
2803         break;
2804       case "function":
2805         switch(item.name) {
2806           case "createPattern":
2807             if (item['arguments'][0].width > 0 && item['arguments'][0].height > 0) {
2808               try {
2809                 ctx.fillStyle = ctx.createPattern(item['arguments'][0], "repeat");
2810               }
2811               catch(e) {
2812                 Util.log("html2canvas: Renderer: Error creating pattern", e.message);
2813               }
2814             }
2815             break;
2816           case "drawShape":
2817             createShape(ctx, item['arguments']);
2818             break;
2819           case "drawImage":
2820             if (item['arguments'][8] > 0 && item['arguments'][7] > 0) {
2821               if (!options.taintTest || (options.taintTest && safeImage(item))) {
2822                 ctx.drawImage.apply( ctx, item['arguments'] );
2823               }
2824             }
2825             break;
2826           default:
2827             ctx[item.name].apply(ctx, item['arguments']);
2828         }
2829         break;
2830     }
2831   }
2832 
2833   return function(parsedData, options, document, queue, _html2canvas) {
2834     var ctx = canvas.getContext("2d"),
2835     newCanvas,
2836     bounds,
2837     fstyle,
2838     zStack = parsedData.stack;
2839 
2840     canvas.width = canvas.style.width =  options.width || zStack.ctx.width;
2841     canvas.height = canvas.style.height = options.height || zStack.ctx.height;
2842 
2843     fstyle = ctx.fillStyle;
2844     ctx.fillStyle = (Util.isTransparent(zStack.backgroundColor) && options.background !== undefined) ? options.background : parsedData.backgroundColor;
2845     ctx.fillRect(0, 0, canvas.width, canvas.height);
2846     ctx.fillStyle = fstyle;
2847 
2848     queue.forEach(function(storageContext) {
2849       // set common settings for canvas
2850       ctx.textBaseline = "bottom";
2851       ctx.save();
2852 
2853       if (storageContext.transform.matrix) {
2854         ctx.translate(storageContext.transform.origin[0], storageContext.transform.origin[1]);
2855         ctx.transform.apply(ctx, storageContext.transform.matrix);
2856         ctx.translate(-storageContext.transform.origin[0], -storageContext.transform.origin[1]);
2857       }
2858 
2859       if (storageContext.clip){
2860         ctx.beginPath();
2861         ctx.rect(storageContext.clip.left, storageContext.clip.top, storageContext.clip.width, storageContext.clip.height);
2862         ctx.clip();
2863       }
2864 
2865       if (storageContext.ctx.storage) {
2866         storageContext.ctx.storage.forEach(function(item) {
2867           renderItem(ctx, item);
2868         });
2869       }
2870 
2871       ctx.restore();
2872     });
2873 
2874     Util.log("html2canvas: Renderer: Canvas renderer done - returning canvas obj");
2875 
2876     if (options.elements.length === 1) {
2877       if (typeof options.elements[0] === "object" && options.elements[0].nodeName !== "BODY") {
2878         // crop image to the bounds of selected (single) element
2879         bounds = _html2canvas.Util.Bounds(options.elements[0]);
2880         newCanvas = document.createElement('canvas');
2881         newCanvas.width = Math.ceil(bounds.width);
2882         newCanvas.height = Math.ceil(bounds.height);
2883         ctx = newCanvas.getContext("2d");
2884 
2885         ctx.drawImage(canvas, bounds.left, bounds.top, bounds.width, bounds.height, 0, 0, bounds.width, bounds.height);
2886         canvas = null;
2887         return newCanvas;
2888       }
2889     }
2890 
2891     return canvas;
2892   };
2893 };
2894 })(window,document);/*!
2895 	AnythingSlider v1.9.2
2896 	Original by Chris Coyier: http://css-tricks.com
2897 	Get the latest version: https://github.com/CSS-Tricks/AnythingSlider
2898 
2899 	To use the navigationFormatter function, you must have a function that
2900 	accepts two paramaters, and returns a string of HTML text.
2901 
2902 	index = integer index (1 based);
2903 	panel = jQuery wrapped LI item this tab references
2904 	@return = Must return a string of HTML/Text
2905 
2906 	navigationFormatter: function(index, panel){
2907 		return "Panel #" + index; // This would have each tab with the text 'Panel #X' where X = index
2908 	}
2909 */
2910 /*jshint browser:true, jquery:true, unused:false */
2911 ;(function($, win, doc) {
2912 	"use strict";
2913 	$.anythingSlider = function(el, options) {
2914 
2915 		var base = this, o, t;
2916 
2917 		// Wraps the ul in the necessary divs and then gives Access to jQuery element
2918 		base.el = el;
2919 		base.$el = $(el).addClass('anythingBase').wrap('<div class="anythingSlider"><div class="anythingWindow" /></div>');
2920 
2921 		// Add a reverse reference to the DOM object
2922 		base.$el.data("AnythingSlider", base);
2923 
2924 		base.init = function(){
2925 
2926 			// Added "o" to be used in the code instead of "base.options" which doesn't get modifed by the compiler - reduces size by ~1k
2927 			base.options = o = $.extend({}, $.anythingSlider.defaults, options);
2928 
2929 			base.initialized = false;
2930 			if ($.isFunction(o.onBeforeInitialize)) { base.$el.bind('before_initialize', o.onBeforeInitialize); }
2931 			base.$el.trigger('before_initialize', base);
2932 
2933 			// Add "as-oldie" class to body for css purposes
2934 			$('<!--[if lte IE 8]><script>jQuery("body").addClass("as-oldie");</script><![endif]-->').appendTo('body').remove();
2935 
2936 			// Cache existing DOM elements for later
2937 			// base.$el = original ul
2938 			// for wrap - get parent() then closest in case the ul has "anythingSlider" class
2939 			base.$wrapper = base.$el.parent().closest('div.anythingSlider').addClass('anythingSlider-' + o.theme);
2940 			base.$outer = base.$wrapper.parent();
2941 			base.$window = base.$el.closest('div.anythingWindow');
2942 			base.$win = $(win);
2943 
2944 			base.$controls = $('<div class="anythingControls"></div>');
2945 			base.$nav = $('<ul class="thumbNav"><li><a><span></span></a></li></ul>');
2946 			base.$startStop = $('<a href="#" class="start-stop"></a>');
2947 			
2948 			if (o.buildStartStop || o.buildNavigation) {
2949 				base.$controls.appendTo( (o.appendControlsTo && $(o.appendControlsTo).length) ? $(o.appendControlsTo) : base.$wrapper);
2950 			}
2951 			if (o.buildNavigation) {
2952 				base.$nav.appendTo( (o.appendNavigationTo && $(o.appendNavigationTo).length) ? $(o.appendNavigationTo) : base.$controls );
2953 			}
2954 			if (o.buildStartStop) {
2955 				base.$startStop.appendTo( (o.appendStartStopTo && $(o.appendStartStopTo).length) ? $(o.appendStartStopTo) : base.$controls );
2956 			}
2957 
2958 			// Figure out how many sliders are on the page for indexing
2959 			base.runTimes = $('.anythingBase').length;
2960 			// hash tag regex - fixes issue #432
2961 			base.regex = (o.hashTags) ? new RegExp('panel' + base.runTimes + '-(\\d+)', 'i') : null;
2962 			if (base.runTimes === 1) { base.makeActive(); } // make the first slider on the page active
2963 
2964 			// Set up a few defaults & get details
2965 			base.flag    = false; // event flag to prevent multiple calls (used in control click/focusin)
2966 			if (o.autoPlayLocked) { o.autoPlay = true; } // if autoplay is locked, start playing
2967 			base.playing = o.autoPlay; // slideshow state; removed "startStopped" option
2968 			base.slideshow = false; // slideshow flag needed to correctly trigger slideshow events
2969 			base.hovered = false; // actively hovering over the slider
2970 			base.panelSize = [];  // will contain dimensions and left position of each panel
2971 			base.currentPage = base.targetPage = o.startPanel = parseInt(o.startPanel,10) || 1; // make sure this isn't a string
2972 			o.changeBy = parseInt(o.changeBy,10) || 1;
2973 
2974 			// set slider type, but keep backward compatibility with the vertical option
2975 			t = (o.mode || 'h').toLowerCase().match(/(h|v|f)/);
2976 			t = o.vertical ? 'v' : (t || ['h'])[0];
2977 			o.mode = t === 'v' ? 'vertical' : t === 'f' ? 'fade' : 'horizontal';
2978 			if (t === 'f') {
2979 				o.showMultiple = 1; // all slides are stacked in fade mode
2980 				o.infiniteSlides = false; // no cloned slides
2981 			}
2982 
2983 			base.adj = (o.infiniteSlides) ? 0 : 1; // adjust page limits for infinite or limited modes
2984 			base.adjustMultiple = 0;
2985 			if (o.playRtl) { base.$wrapper.addClass('rtl'); }
2986 
2987 			// Build start/stop button
2988 			if (o.buildStartStop) { base.buildAutoPlay(); }
2989 
2990 			// Build forwards/backwards buttons
2991 			if (o.buildArrows) { base.buildNextBackButtons(); }
2992 
2993 			base.$lastPage = base.$targetPage = base.$currentPage;
2994 
2995 			base.updateSlider();
2996 
2997 			// Expand slider to fit parent
2998 			if (o.expand) {
2999 				base.$window.css({ width: '100%', height: '100%' }); // needed for Opera
3000 				base.checkResize();
3001 			}
3002 
3003 			// Make sure easing function exists.
3004 			if (!$.isFunction($.easing[o.easing])) { o.easing = "swing"; }
3005 
3006 			// If pauseOnHover then add hover effects
3007 			if (o.pauseOnHover) {
3008 				base.$wrapper.hover(function() {
3009 					if (base.playing) {
3010 						base.$el.trigger('slideshow_paused', base);
3011 						base.clearTimer(true);
3012 					}
3013 				}, function() {
3014 					if (base.playing) {
3015 						base.$el.trigger('slideshow_unpaused', base);
3016 						base.startStop(base.playing, true);
3017 					}
3018 				});
3019 			}
3020 
3021 			// Hide/Show navigation & play/stop controls
3022 			base.slideControls(false);
3023 			base.$wrapper.bind('mouseenter mouseleave', function(e){
3024 				// add hovered class to outer wrapper
3025 				$(this)[e.type === 'mouseenter' ? 'addClass' : 'removeClass']('anythingSlider-hovered');
3026 				base.hovered = (e.type === 'mouseenter') ? true : false;
3027 				base.slideControls(base.hovered);
3028 			});
3029 
3030 			// Add keyboard navigation
3031 			$(doc).keyup(function(e){
3032 				// Stop arrow keys from working when focused on form items
3033 				if (o.enableKeyboard && base.$wrapper.hasClass('activeSlider') && !e.target.tagName.match('TEXTAREA|INPUT|SELECT')) {
3034 					if (o.mode !== 'vertical' && (e.which === 38 || e.which === 40)) { return; }
3035 					switch (e.which) {
3036 						case 39: case 40: // right & down arrow
3037 							base.goForward();
3038 							break;
3039 						case 37: case 38: // left & up arrow
3040 							base.goBack();
3041 							break;
3042 					}
3043 				}
3044 			});
3045 
3046 			// If a hash can not be used to trigger the plugin, then go to start panel - see issue #432
3047 			base.currentPage = ((o.hashTags) ? base.gotoHash() : '') || o.startPanel || 1;
3048 			base.gotoPage(base.currentPage, false, null, -1);
3049 
3050 			// Binds events
3051 			var triggers = "slideshow_resized slideshow_paused slideshow_unpaused slide_init slide_begin slideshow_stop slideshow_start initialized swf_completed".split(" ");
3052 			$.each("onSliderResize onShowPause onShowUnpause onSlideInit onSlideBegin onShowStop onShowStart onInitialized onSWFComplete".split(" "), function(i,f){
3053 				if ($.isFunction(o[f])){
3054 					base.$el.bind(triggers[i], o[f]);
3055 				}
3056 			});
3057 			if ($.isFunction(o.onSlideComplete)){
3058 				// Added setTimeout (zero time) to ensure animation is complete... see this bug report: http://bugs.jquery.com/ticket/7157
3059 				base.$el.bind('slide_complete', function(){
3060 					setTimeout(function(){ o.onSlideComplete(base); }, 0);
3061 					return false;
3062 				});
3063 			}
3064 			base.initialized = true;
3065 			base.$el.trigger('initialized', base);
3066 
3067 			// trigger the slideshow
3068 			base.startStop(o.autoPlay);
3069 
3070 		};
3071 
3072 		// called during initialization & to update the slider if a panel is added or deleted
3073 		base.updateSlider = function(){
3074 			// needed for updating the slider
3075 			base.$el.children('.cloned').remove();
3076 			base.navTextVisible = base.$nav.find('span:first').css('visibility') !== 'hidden';
3077 			base.$nav.empty();
3078 			// set currentPage to 1 in case it was zero - occurs when adding slides after removing them all
3079 			base.currentPage = base.currentPage || 1;
3080 
3081 			base.$items = base.$el.children();
3082 			base.pages = base.$items.length;
3083 			base.dir = (o.mode === 'vertical') ? 'top' : 'left';
3084 			o.showMultiple = parseInt(o.showMultiple, 10) || 1; // only integers allowed
3085 			o.navigationSize = (o.navigationSize === false) ? 0 : parseInt(o.navigationSize,10) || 0;
3086 
3087 			// Fix tabbing through the page, but don't change the view if the link is in view (showMultiple = true)
3088 			base.$items.find('a').unbind('focus.AnythingSlider').bind('focus.AnythingSlider', function(e){
3089 				var panel = $(this).closest('.panel'),
3090 					indx = base.$items.index(panel) + base.adj; // index can be -1 in nested sliders - issue #208
3091 				base.$items.find('.focusedLink').removeClass('focusedLink');
3092 				$(this).addClass('focusedLink');
3093 				base.$window.scrollLeft(0).scrollTop(0);
3094 				if ( ( indx !== -1 && (indx >= base.currentPage + o.showMultiple || indx < base.currentPage) ) ) {
3095 					base.gotoPage(indx);
3096 					e.preventDefault();
3097 				}
3098 			});
3099 			if (o.showMultiple > 1) {
3100 				if (o.showMultiple > base.pages) { o.showMultiple = base.pages; }
3101 				base.adjustMultiple = (o.infiniteSlides && base.pages > 1) ? 0 : o.showMultiple - 1;
3102 			}
3103 
3104 			// Hide navigation & player if there is only one page
3105 			base.$controls
3106 				.add(base.$nav)
3107 				.add(base.$startStop)
3108 				.add(base.$forward)
3109 				.add(base.$back)[(base.pages <= 1) ? 'hide' : 'show']();
3110 			if (base.pages > 1) {
3111 				// Build/update navigation tabs
3112 				base.buildNavigation();
3113 			}
3114 
3115 			// Top and tail the list with 'visible' number of items, top has the last section, and tail has the first
3116 			// This supports the "infinite" scrolling, also ensures any cloned elements don't duplicate an ID
3117 			// Moved removeAttr before addClass otherwise IE7 ignores the addClass: http://bugs.jquery.com/ticket/9871
3118 			if (o.mode !== 'fade' && o.infiniteSlides && base.pages > 1) {
3119 				base.$el.prepend( base.$items.filter(':last').clone().addClass('cloned') );
3120 				// Add support for multiple sliders shown at the same time
3121 				if (o.showMultiple > 1) {
3122 					base.$el.append( base.$items.filter(':lt(' + o.showMultiple + ')').clone().addClass('cloned multiple') );
3123 				} else {
3124 					base.$el.append( base.$items.filter(':first').clone().addClass('cloned') );
3125 				}
3126 				base.$el.find('.cloned').each(function(){
3127 					// disable all focusable elements in cloned panels to prevent shifting the panels by tabbing
3128 					$(this).find('a,input,textarea,select,button,area,form').attr({ disabled : 'disabled', name : '' });
3129 					$(this).find('[id]')[ $.fn.addBack ? 'addBack' : 'andSelf' ]().removeAttr('id');
3130 				});
3131 			}
3132 
3133 			// We just added two items, time to re-cache the list, then get the dimensions of each panel
3134 			base.$items = base.$el.addClass(o.mode).children().addClass('panel');
3135 			base.setDimensions();
3136 
3137 			// Set the dimensions of each panel
3138 			if (o.resizeContents) {
3139 				base.$items.css('width', base.width);
3140 				base.$wrapper
3141 					.css('width', base.getDim(base.currentPage)[0])
3142 					.add(base.$items).css('height', base.height);
3143 			} else {
3144 				base.$win.load(function(){
3145 					// set dimensions after all images load
3146 					base.setDimensions();
3147 					// make sure the outer wrapper is set properly
3148 					t = base.getDim(base.currentPage);
3149 					base.$wrapper.css({ width: t[0], height: t[1] });
3150 					base.setCurrentPage(base.currentPage, false);
3151 				});
3152 			}
3153 
3154 			if (base.currentPage > base.pages) {
3155 				base.currentPage = base.pages;
3156 			}
3157 			base.setCurrentPage(base.currentPage, false);
3158 			base.$nav.find('a').eq(base.currentPage - 1).addClass('cur'); // update current selection
3159 
3160 			if (o.mode === 'fade') {
3161 				t = base.$items.eq(base.currentPage-1);
3162 				if (o.resumeOnVisible) {
3163 					// prevent display: none;
3164 					t.css({ opacity: 1 }).siblings().css({ opacity: 0 });
3165 				} else {
3166 					// allow display: none; - resets video
3167 					base.$items.css('opacity',1);
3168 					t.fadeIn(0).siblings().fadeOut(0);
3169 				}
3170 			}
3171 
3172 		};
3173 
3174 		// Creates the numbered navigation links
3175 		base.buildNavigation = function() {
3176 			if (o.buildNavigation && (base.pages > 1)) {
3177 				var a, c, i, t, $li;
3178 				base.$items.filter(':not(.cloned)').each(function(j){
3179 					$li = $('<li/>');
3180 					i = j + 1;
3181 					c = (i === 1 ? ' first' : '') + (i === base.pages ? ' last' : '');
3182 					a = '<a class="panel' + i + ( base.navTextVisible ? '"' : ' ' + o.tooltipClass + '" title="@"' ) + ' href="#"><span>@</span></a>';
3183 					// If a formatter function is present, use it
3184 					if ($.isFunction(o.navigationFormatter)) {
3185 						t = o.navigationFormatter(i, $(this));
3186 						if (typeof(t) === "string") {
3187 							$li.html(a.replace(/@/g,t));
3188 						} else {
3189 							$li = $('<li/>', t);
3190 						}
3191 					} else {
3192 						$li.html(a.replace(/@/g,i));
3193 					}
3194 					$li
3195 					.appendTo(base.$nav)
3196 					.addClass(c)
3197 					.data('index', i);
3198 				});
3199 				base.$nav.children('li').bind(o.clickControls, function(e) {
3200 					if (!base.flag && o.enableNavigation) {
3201 						// prevent running functions twice (once for click, second time for focusin)
3202 						base.flag = true; setTimeout(function(){ base.flag = false; }, 100);
3203 						base.gotoPage( $(this).data('index') );
3204 					}
3205 					e.preventDefault();
3206 				});
3207 
3208 				// Add navigation tab scrolling - use !! in case someone sets the size to zero
3209 				if (!!o.navigationSize && o.navigationSize < base.pages) {
3210 					if (!base.$controls.find('.anythingNavWindow').length){
3211 						base.$nav
3212 							.before('<ul><li class="prev"><a href="#"><span>' + o.backText + '</span></a></li></ul>')
3213 							.after('<ul><li class="next"><a href="#"><span>' + o.forwardText + '</span></a></li></ul>')
3214 							.wrap('<div class="anythingNavWindow"></div>');
3215 					}
3216 					// include half of the left position to include extra width from themes like tabs-light and tabs-dark (still not perfect)
3217 					base.navWidths = base.$nav.find('li').map(function(){
3218 						return $(this).outerWidth(true) + Math.ceil(parseInt($(this).find('span').css('left'),10)/2 || 0);
3219 					}).get();
3220 					base.navLeft = base.currentPage;
3221 					// add 25 pixels (old IE needs more than 5) to make sure the tabs don't wrap to the next line
3222 					base.$nav.width( base.navWidth( 1, base.pages + 1 ) + 25 );
3223 					base.$controls.find('.anythingNavWindow')
3224 						.width( base.navWidth( 1, o.navigationSize + 1 ) ).end()
3225 						.find('.prev,.next').bind(o.clickControls, function(e) {
3226 							if (!base.flag) {
3227 								base.flag = true; setTimeout(function(){ base.flag = false; }, 200);
3228 								base.navWindow( base.navLeft + o.navigationSize * ( $(this).is('.prev') ? -1 : 1 ) );
3229 							}
3230 							e.preventDefault();
3231 						});
3232 				}
3233 
3234 			}
3235 		};
3236 
3237 		base.navWidth = function(x,y){
3238 			var i, s = Math.min(x,y),
3239 				e = Math.max(x,y),
3240 				w = 0;
3241 			for (i = s; i < e; i++) {
3242 				w += base.navWidths[i-1] || 0;
3243 			}
3244 			return w;
3245 		};
3246 
3247 		base.navWindow = function(n){
3248 			if (!!o.navigationSize && o.navigationSize < base.pages && base.navWidths) {
3249 				var p = base.pages - o.navigationSize + 1;
3250 				n = (n <= 1) ? 1 : (n > 1 && n < p) ? n : p;
3251 				if (n !== base.navLeft) {
3252 					base.$controls.find('.anythingNavWindow').animate(
3253 						{ scrollLeft: base.navWidth(1, n), width: base.navWidth(n, n + o.navigationSize) },
3254 						{ queue: false, duration: o.animationTime });
3255 					base.navLeft = n;
3256 				}
3257 			}
3258 		};
3259 
3260 		// Creates the Forward/Backward buttons
3261 		base.buildNextBackButtons = function() {
3262 			base.$forward = $('<span class="arrow forward"><a href="#"><span>' + o.forwardText + '</span></a></span>');
3263 			base.$back = $('<span class="arrow back"><a href="#"><span>' + o.backText + '</span></a></span>');
3264 
3265 			// Bind to the forward and back buttons
3266 			base.$back.bind(o.clickBackArrow, function(e) {
3267 				// prevent running functions twice (once for click, second time for swipe)
3268 				if (o.enableArrows && !base.flag) {
3269 					base.flag = true; setTimeout(function(){ base.flag = false; }, 100);
3270 					base.goBack();
3271 				}
3272 				e.preventDefault();
3273 			});
3274 			base.$forward.bind(o.clickForwardArrow, function(e) {
3275 				// prevent running functions twice (once for click, second time for swipe)
3276 				if (o.enableArrows && !base.flag) {
3277 					base.flag = true; setTimeout(function(){ base.flag = false; }, 100);
3278 					base.goForward();
3279 				}
3280 				e.preventDefault();
3281 			});
3282 			// using tab to get to arrow links will show they have focus (outline is disabled in css)
3283 			base.$back.add(base.$forward).find('a').bind('focusin focusout',function(){
3284 				$(this).toggleClass('hover');
3285 			});
3286 
3287 			// Append elements to page
3288 			base.$back.appendTo( (o.appendBackTo && $(o.appendBackTo).length) ? $(o.appendBackTo) : base.$wrapper );
3289 			base.$forward.appendTo( (o.appendForwardTo && $(o.appendForwardTo).length) ? $(o.appendForwardTo) : base.$wrapper );
3290 
3291 			base.arrowWidth = base.$forward.width(); // assuming the left & right arrows are the same width - used for toggle
3292 			base.arrowRight = parseInt(base.$forward.css('right'), 10);
3293 			base.arrowLeft = parseInt(base.$back.css('left'), 10);
3294 
3295 		};
3296 
3297 		// Creates the Start/Stop button
3298 		base.buildAutoPlay = function(){
3299 			base.$startStop
3300 				.html('<span>' + (base.playing ? o.stopText : o.startText) + '</span>')
3301 				.bind(o.clickSlideshow, function(e) {
3302 					if (o.enableStartStop) {
3303 						base.startStop(!base.playing);
3304 						base.makeActive();
3305 						if (base.playing && !o.autoPlayDelayed) {
3306 							base.goForward(true, o.playRtl);
3307 						}
3308 					}
3309 					e.preventDefault();
3310 				})
3311 				// show button has focus while tabbing
3312 				.bind('focusin focusout',function(){
3313 					$(this).toggleClass('hover');
3314 				});
3315 		};
3316 
3317 		// Adjust slider dimensions on parent element resize
3318 		base.checkResize = function(stopTimer){
3319 			// checking document visibility - 
3320 			var vis = !!(doc.hidden || doc.webkitHidden || doc.mozHidden || doc.msHidden);
3321 			clearTimeout(base.resizeTimer);
3322 			base.resizeTimer = setTimeout(function(){
3323 				var w = base.$outer.width(),
3324 					h = base.$outer[0].tagName === "BODY" ? base.$win.height() : base.$outer.height();
3325 				// base.width = width of one panel, so multiply by # of panels; outerPad is padding added for arrows.
3326 				// ignore changes if window hidden
3327 				if (!vis && (base.lastDim[0] !== w || base.lastDim[1] !== h)) {
3328 					
3329 					base.setDimensions(); // adjust panel sizes
3330 					
3331 					//callback for slider resize
3332 					base.$el.trigger('slideshow_resized', base);
3333 					
3334 					// make sure page is lined up (use -1 animation time, so we can differeniate it from when animationTime = 0)
3335 					base.gotoPage(base.currentPage, base.playing, null, -1);
3336 					
3337 				}
3338 				if (typeof(stopTimer) === 'undefined'){ base.checkResize(); }
3339 				
3340 				// increase time if page is hidden; but don't stop it completely
3341 			}, vis ? 2000 : 500);
3342 		};
3343 
3344 		// Set panel dimensions to either resize content or adjust panel to content
3345 		base.setDimensions = function(){
3346 
3347 			// reset element width & height
3348 			base.$wrapper.find('.anythingWindow, .anythingBase, .panel')[ $.fn.addBack ? 'addBack' : 'andSelf' ]().css({ width: '', height: '' });
3349 			base.width = base.$el.width();
3350 			base.height = base.$el.height();
3351 			base.outerPad = [ base.$wrapper.innerWidth() - base.$wrapper.width(), base.$wrapper.innerHeight() - base.$wrapper.height() ];
3352 			var w, h, c, t, edge = 0,
3353 				fullsize = { width: '100%', height: '100%' },
3354 				// determine panel width
3355 				pw = (o.showMultiple > 1 && o.mode === 'horizontal') ? base.width || base.$window.width()/o.showMultiple : base.$window.width(),
3356 				ph = (o.showMultiple > 1 && o.mode === 'vertical') ? base.height/o.showMultiple || base.$window.height()/o.showMultiple : base.$window.height();
3357 			if (o.expand){
3358 				base.lastDim = [ base.$outer.width(), base.$outer.height() ];
3359 				w = base.lastDim[0] - base.outerPad[0];
3360 				h = base.lastDim[1] - base.outerPad[1];
3361 				base.$wrapper.add(base.$window).css({ width: w, height: h });
3362 				base.height = h = (o.showMultiple > 1 && o.mode === 'vertical') ? ph : h;
3363 				base.width = pw = (o.showMultiple > 1 && o.mode === 'horizontal') ? w/o.showMultiple : w;
3364 				base.$items.css({ width: pw, height: ph });
3365 			}
3366 			base.$items.each(function(i){
3367 				t = $(this);
3368 				c = t.children();
3369 				if (o.resizeContents){
3370 					// resize panel
3371 					w = base.width;
3372 					h = base.height;
3373 					t.css({ width: w, height: h });
3374 					if (c.length) {
3375 						if (c[0].tagName === "EMBED") { c.attr(fullsize); } // needed for IE7; also c.length > 1 in IE7
3376 						if (c[0].tagName === "OBJECT") { c.find('embed').attr(fullsize); }
3377 						// resize panel contents, if solitary (wrapped content or solitary image)
3378 						if (c.length === 1){ c.css(fullsize); }
3379 					}
3380 				} else {
3381 					// get panel width & height and save it
3382 					if (o.mode === 'vertical') {
3383 						w = t.css('display','inline-block').width();
3384 						t.css('display','');
3385 					} else {
3386 						w = t.width() || base.width; // if image hasn't finished loading, width will be zero, so set it to base width instead
3387 					}
3388 					if (c.length === 1 && w >= pw){
3389 						w = (c.width() >= pw) ? pw : c.width(); // get width of solitary child
3390 						c.css('max-width', w);   // set max width for all children
3391 					}
3392 					t.css({ width: w, height: '' }); // set width of panel
3393 					h = (c.length === 1 ? c.outerHeight(true) : t.height()); // get height after setting width
3394 					if (h <= base.outerPad[1]) { h = base.height; } // if height less than the outside padding, then set it to the preset height
3395 					t.css('height', h);
3396 				}
3397 				base.panelSize[i] = [w,h,edge];
3398 				edge += (o.mode === 'vertical') ? h : w;
3399 			});
3400 			// Set total width of slider
3401 			base.$el.css((o.mode === 'vertical' ? 'height' : 'width'), o.mode === 'fade' ? base.width : edge );
3402 		};
3403 
3404 		// get dimension of multiple panels, as needed
3405 		base.getDim = function(page){
3406 			var t, i, w = base.width, h = base.height;
3407 			if (base.pages < 1 || isNaN(page)) { return [ w, h ]; } // prevent errors when base.panelSize is empty
3408 			page = (o.infiniteSlides && base.pages > 1) ? page : page - 1;
3409 			i = base.panelSize[page];
3410 			if (i) {
3411 				w = i[0] || w;
3412 				h = i[1] || h;
3413 			}
3414 			if (o.showMultiple > 1) {
3415 				for (i = 1; i < o.showMultiple; i++) {
3416 					t = page + i;
3417 					if (o.mode === 'vertical') {
3418 						w = Math.max(w, base.panelSize[t][0]);
3419 						h += base.panelSize[t][1];
3420 					} else {
3421 						w += base.panelSize[t][0];
3422 						h = Math.max(h, base.panelSize[t][1]);
3423 					}
3424 				}
3425 			}
3426 			return [w,h];
3427 		};
3428 
3429 		base.goForward = function(autoplay, rtl) {
3430 			// targetPage changes before animation so if rapidly changing pages, it will have the correct current page
3431 			base.gotoPage(base[ o.allowRapidChange ? 'targetPage' : 'currentPage'] + o.changeBy * (rtl ? -1 : 1), autoplay);
3432 		};
3433 
3434 		base.goBack = function(autoplay) {
3435 			base.gotoPage(base[ o.allowRapidChange ? 'targetPage' : 'currentPage'] - o.changeBy, autoplay);
3436 		};
3437 
3438 		base.gotoPage = function(page, autoplay, callback, time) {
3439 			if (autoplay !== true) {
3440 				autoplay = false;
3441 				base.startStop(false);
3442 				base.makeActive();
3443 			}
3444 			// check if page is an id or class name
3445 			if (/^[#|.]/.test(page) && $(page).length) {
3446 				page = $(page).closest('.panel').index() + base.adj;
3447 			}
3448 
3449 			// rewind effect occurs here when changeBy > 1
3450 			if (o.changeBy !== 1){
3451 				var adj = base.pages - base.adjustMultiple;
3452 				if (page < 1) {
3453 					page = o.stopAtEnd ? 1 : ( o.infiniteSlides ? base.pages + page : ( o.showMultiple > 1 - page ? 1 : adj ) );
3454 				}
3455 				if (page > base.pages) {
3456 					page = o.stopAtEnd ? base.pages : ( o.showMultiple > 1 - page ? 1 : page -= adj );
3457 				} else if (page >= adj) {
3458 					// show multiple adjustments
3459 					page = adj;
3460 				}
3461 			}
3462 
3463 			if (base.pages <= 1) { return; } // prevents animation
3464 			base.$lastPage = base.$currentPage;
3465 			if (typeof(page) !== "number") {
3466 				page = parseInt(page,10) || o.startPanel;
3467 				base.setCurrentPage(page);
3468 			}
3469 
3470 			// pause YouTube videos before scrolling or prevent change if playing
3471 			if (autoplay && o.isVideoPlaying(base)) { return; }
3472 			if (o.stopAtEnd && !o.infiniteSlides && page > base.pages - o.showMultiple) { page = base.pages - o.showMultiple + 1; } // fixes #515
3473 			base.exactPage = page;
3474 			if (page > base.pages + 1 - base.adj) { page = (!o.infiniteSlides && !o.stopAtEnd) ? 1 : base.pages; }
3475 			if (page < base.adj ) { page = (!o.infiniteSlides && !o.stopAtEnd) ? base.pages : 1; }
3476 			if (!o.infiniteSlides) { base.exactPage = page; } // exact page used by the fx extension
3477 			base.currentPage = ( page > base.pages ) ? base.pages : ( page < 1 ) ? 1 : base.currentPage;
3478 			base.$currentPage = base.$items.eq(base.currentPage - base.adj);
3479 			base.targetPage = (page === 0) ? base.pages : (page > base.pages) ? 1 : page;
3480 			base.$targetPage = base.$items.eq(base.targetPage - base.adj);
3481 			time = typeof time !== 'undefined' ? time : o.animationTime;
3482 			// don't trigger events when time < 0 - to prevent FX from firing multiple times on page resize
3483 			if (time >= 0) { base.$el.trigger('slide_init', base); }
3484 			// toggle arrows/controls only if there is time to see it - fix issue #317
3485 			if (time > 0) { base.slideControls(true); }
3486 
3487 			// Set visual
3488 			if (o.buildNavigation){
3489 				base.setNavigation(base.targetPage);
3490 			}
3491 
3492 			// When autoplay isn't passed, we stop the timer
3493 			if (autoplay !== true) { autoplay = false; }
3494 			// Stop the slider when we reach the last page, if the option stopAtEnd is set to true
3495 			if (!autoplay || (o.stopAtEnd && page === base.pages)) { base.startStop(false); }
3496 
3497 			if (time >= 0) { base.$el.trigger('slide_begin', base); }
3498 
3499 			// delay starting slide animation
3500 			setTimeout(function(d){
3501 				var t, p, empty = true;
3502 				if (o.allowRapidChange) {
3503 					base.$wrapper.add(base.$el).add(base.$items).stop(true, true);
3504 				}
3505 				// resize slider if content size varies
3506 				if (!o.resizeContents) {
3507 					// animating the wrapper resize before the window prevents flickering in Firefox
3508 					// don't animate the dimension if it hasn't changed - fix for issue #264
3509 					p = base.getDim(page); d = {};
3510 					// prevent animating a dimension to zero
3511 					if (base.$wrapper.width() !== p[0]) { d.width = p[0] || base.width; empty = false; }
3512 					if (base.$wrapper.height() !== p[1]) { d.height = p[1] || base.height; empty = false; }
3513 					if (!empty) {
3514 						base.$wrapper.filter(':not(:animated)').animate(d, { queue: false, duration: (time < 0 ? 0 : time), easing: o.easing });
3515 					}
3516 				}
3517 
3518 				if (o.mode === 'fade') {
3519 					if (base.$lastPage[0] !== base.$targetPage[0]) {
3520 						base.fadeIt( base.$lastPage, 0, time );
3521 						base.fadeIt( base.$targetPage, 1, time, function(){ base.endAnimation(page, callback, time); });
3522 					} else {
3523 						base.endAnimation(page, callback, time);
3524 					}
3525 				} else {
3526 					d = {};
3527 					d[base.dir] = -base.panelSize[(o.infiniteSlides && base.pages > 1) ? page : page - 1][2];
3528 					// resize width of base element (ul) if vertical & width of content varies
3529 					if (o.mode === 'vertical' && !o.resizeContents) { d.width = p[0]; }
3530 					// Animate Slider
3531 					base.$el.filter(':not(:animated)').animate(
3532 						d, { queue: false, duration: time < 0 ? 0 : time, easing: o.easing, complete: function(){ base.endAnimation(page, callback, time); } }
3533 					);
3534 				}
3535 			}, parseInt(o.delayBeforeAnimate, 10) || 0);
3536 		};
3537 
3538 		base.endAnimation = function(page, callback, time){
3539 			if (page === 0) {
3540 				base.$el.css( base.dir, o.mode === 'fade' ? 0 : -base.panelSize[base.pages][2]);
3541 				page = base.pages;
3542 			} else if (page > base.pages) {
3543 				// reset back to start position
3544 				base.$el.css( base.dir, o.mode === 'fade' ? 0 : -base.panelSize[1][2]);
3545 				page = 1;
3546 			}
3547 			base.exactPage = page;
3548 			base.setCurrentPage(page, false);
3549 
3550 			if (o.mode === 'fade') {
3551 				// make sure non current panels are hidden (rapid slide changes)
3552 				base.fadeIt( base.$items.not(':eq(' + (page - base.adj) + ')'), 0, 0);
3553 			}
3554 
3555 			if (!base.hovered) { base.slideControls(false); }
3556 
3557 			if (o.hashTags) { base.setHash(page); }
3558 
3559 			if (time >= 0) { base.$el.trigger('slide_complete', base); }
3560 			// callback from external slide control: $('#slider').anythingSlider(4, function(slider){ })
3561 			if (typeof callback === 'function') { callback(base); }
3562 
3563 			// Continue slideshow after a delay
3564 			if (o.autoPlayLocked && !base.playing) {
3565 				setTimeout(function(){
3566 					base.startStop(true);
3567 				// subtract out slide delay as the slideshow waits that additional time.
3568 				}, o.resumeDelay - (o.autoPlayDelayed ? o.delay : 0));
3569 			}
3570 		};
3571 
3572 		base.fadeIt = function(el, toOpacity, time, callback){
3573 			var t = time < 0 ? 0 : time;
3574 			if (o.resumeOnVisible) {
3575 				el.filter(':not(:animated)').fadeTo(t, toOpacity, callback);
3576 			} else {
3577 				el.filter(':not(:animated)')[ toOpacity === 0 ? 'fadeOut' : 'fadeIn' ](t, callback);
3578 			}
3579 		};
3580 
3581 		base.setCurrentPage = function(page, move) {
3582 			page = parseInt(page, 10);
3583 
3584 			if (base.pages < 1 || page === 0 || isNaN(page)) { return; }
3585 			if (page > base.pages + 1 - base.adj) { page = base.pages - base.adj; }
3586 			if (page < base.adj ) { page = 1; }
3587 
3588 			// hide/show arrows based on infinite scroll mode
3589 			if (o.buildArrows && !o.infiniteSlides && o.stopAtEnd){
3590 				base.$forward[ page === base.pages - base.adjustMultiple ? 'addClass' : 'removeClass']('disabled');
3591 				base.$back[ page === 1 ? 'addClass' : 'removeClass']('disabled');
3592 				if (page === base.pages && base.playing) { base.startStop(); }
3593 			}
3594 
3595 			// Only change left if move does not equal false
3596 			if (!move) {
3597 				var d = base.getDim(page);
3598 				base.$wrapper
3599 					.css({ width: d[0], height: d[1] })
3600 					.add(base.$window).scrollLeft(0).scrollTop(0); // reset in case tabbing changed this scrollLeft - probably overly redundant
3601 				base.$el.css( base.dir, o.mode === 'fade' ? 0 : -base.panelSize[(o.infiniteSlides && base.pages > 1) ? page : page - 1][2] );
3602 			}
3603 
3604 			// Update local variable
3605 			base.currentPage = page;
3606 			base.$currentPage = base.$items.removeClass('activePage').eq(page - base.adj).addClass('activePage');
3607 
3608 			if (o.buildNavigation){
3609 				base.setNavigation(page);
3610 			}
3611 
3612 		};
3613 
3614 		base.setNavigation = function(page){
3615 			base.$nav
3616 				.find('.cur').removeClass('cur').end()
3617 				.find('a').eq(page - 1).addClass('cur');
3618 		};
3619 
3620 		base.makeActive = function(){
3621 			// Set current slider as active so keyboard navigation works properly
3622 			if (!base.$wrapper.hasClass('activeSlider')){
3623 				$('.activeSlider').removeClass('activeSlider');
3624 				base.$wrapper.addClass('activeSlider');
3625 			}
3626 		};
3627 
3628 		// This method tries to find a hash that matches an ID and panel-X
3629 		// If either found, it tries to find a matching item
3630 		// If that is found as well, then it returns the page number
3631 		base.gotoHash = function(){
3632 			var h = win.location.hash,
3633 				i = h.indexOf('&'),
3634 				n = h.match(base.regex);
3635 			// test for "/#/" or "/#!/" used by the jquery address plugin - $('#/') breaks jQuery
3636 			if (n === null && !/^#&/.test(h) && !/#!?\//.test(h) && !/\=/.test(h)) {
3637 				// #quote2&panel1-3&panel3-3
3638 				h = h.substring(0, (i >= 0 ? i : h.length));
3639 				// ensure the element is in the same slider
3640 				n = ($(h).length && $(h).closest('.anythingBase')[0] === base.el) ? base.$items.index($(h).closest('.panel')) + base.adj : null;
3641 			} else if (n !== null) {
3642 				// #&panel1-3&panel3-3
3643 				n = (o.hashTags) ? parseInt(n[1],10) : null;
3644 			}
3645 			return n;
3646 		};
3647 
3648 		base.setHash = function(n){
3649 			var s = 'panel' + base.runTimes + '-',
3650 				h = win.location.hash;
3651 			if ( typeof h !== 'undefined' ) {
3652 				win.location.hash = (h.indexOf(s) > 0) ? h.replace(base.regex, s + n) : h + "&" + s + n;
3653 			}
3654 		};
3655 
3656 		// Slide controls (nav and play/stop button up or down)
3657 		base.slideControls = function(toggle){
3658 			var dir = (toggle) ? 'slideDown' : 'slideUp',
3659 				t1 = (toggle) ? 0 : o.animationTime,
3660 				t2 = (toggle) ? o.animationTime : 0,
3661 				op = (toggle) ? 1 : 0,
3662 				sign = (toggle) ? 0 : 1; // 0 = visible, 1 = hidden
3663 			if (o.toggleControls) {
3664 				base.$controls.stop(true,true).delay(t1)[dir](o.animationTime/2).delay(t2);
3665 			}
3666 			if (o.buildArrows && o.toggleArrows) {
3667 				if (!base.hovered && base.playing) { sign = 1; op = 0; } // don't animate arrows during slideshow
3668 				base.$forward.stop(true,true).delay(t1).animate({ right: base.arrowRight + (sign * base.arrowWidth), opacity: op }, o.animationTime/2);
3669 				base.$back.stop(true,true).delay(t1).animate({ left: base.arrowLeft + (sign * base.arrowWidth), opacity: op }, o.animationTime/2);
3670 			}
3671 		};
3672 
3673 		base.clearTimer = function(paused){
3674 			// Clear the timer only if it is set
3675 			if (base.timer) {
3676 				win.clearInterval(base.timer);
3677 				if (!paused && base.slideshow) {
3678 					base.$el.trigger('slideshow_stop', base);
3679 					base.slideshow = false;
3680 				}
3681 			}
3682 		};
3683 
3684 		// Pass startStop(false) to stop and startStop(true) to play
3685 		base.startStop = function(playing, paused) {
3686 			if (playing !== true) { playing = false; }  // Default if not supplied is false
3687 			base.playing = playing;
3688 
3689 			if (playing && !paused) {
3690 				base.$el.trigger('slideshow_start', base);
3691 				base.slideshow = true;
3692 			}
3693 
3694 			// Toggle playing and text
3695 			if (o.buildStartStop) {
3696 				base.$startStop.toggleClass('playing', playing).find('span').html( playing ? o.stopText : o.startText );
3697 				// add button text to title attribute if it is hidden by text-indent
3698 				if ( base.$startStop.find('span').css('visibility') === "hidden" ) {
3699 					base.$startStop.addClass(o.tooltipClass).attr( 'title', playing ? o.stopText : o.startText );
3700 				}
3701 			}
3702 
3703 			// Pause slideshow while video is playing
3704 			if (playing){
3705 				base.clearTimer(true); // Just in case this was triggered twice in a row
3706 				base.timer = win.setInterval(function() {
3707 					if ( !!(doc.hidden || doc.webkitHidden || doc.mozHidden || doc.msHidden) ) {
3708 						// stop slideshow if the page isn't visible (issue #463)
3709 						if (!o.autoPlayLocked) {
3710 							base.startStop();
3711 						}
3712 					} else if ( !o.isVideoPlaying(base) ) {
3713 						// prevent autoplay if video is playing
3714 						base.goForward(true, o.playRtl);
3715 					} else if (!o.resumeOnVideoEnd) {
3716 						// stop slideshow if resume if false
3717 						base.startStop();
3718 					}
3719 				}, o.delay);
3720 			} else {
3721 				base.clearTimer();
3722 			}
3723 		};
3724 
3725 		// Trigger the initialization
3726 		base.init();
3727 	};
3728 
3729 	$.anythingSlider.defaults = {
3730 		// Appearance
3731 		theme               : "default", // Theme name, add the css stylesheet manually
3732 		mode                : "horiz",   // Set mode to "horizontal", "vertical" or "fade" (only first letter needed); replaces vertical option
3733 		expand              : false,     // If true, the entire slider will expand to fit the parent element
3734 		resizeContents      : true,      // If true, solitary images/objects in the panel will expand to fit the viewport
3735 		showMultiple        : false,     // Set this value to a number and it will show that many slides at once
3736 		easing              : "swing",   // Anything other than "linear" or "swing" requires the easing plugin or jQuery UI
3737 
3738 		buildArrows         : true,      // If true, builds the forwards and backwards buttons
3739 		buildNavigation     : true,      // If true, builds a list of anchor links to link to each panel
3740 		buildStartStop      : true,      // ** If true, builds the start/stop button
3741 
3742 /*
3743 		// commented out as this will reduce the size of the minified version
3744 		appendForwardTo     : null,      // Append forward arrow to a HTML element (jQuery Object, selector or HTMLNode), if not null
3745 		appendBackTo        : null,      // Append back arrow to a HTML element (jQuery Object, selector or HTMLNode), if not null
3746 		appendControlsTo    : null,      // Append controls (navigation + start-stop) to a HTML element (jQuery Object, selector or HTMLNode), if not null
3747 		appendNavigationTo  : null,      // Append navigation buttons to a HTML element (jQuery Object, selector or HTMLNode), if not null
3748 		appendStartStopTo   : null,      // Append start-stop button to a HTML element (jQuery Object, selector or HTMLNode), if not null
3749 */
3750 
3751 		toggleArrows        : false,     // If true, side navigation arrows will slide out on hovering & hide @ other times
3752 		toggleControls      : false,     // if true, slide in controls (navigation + play/stop button) on hover and slide change, hide @ other times
3753 
3754 		startText           : "Start",   // Start button text
3755 		stopText            : "Stop",    // Stop button text
3756 		forwardText         : "»", // Link text used to move the slider forward (hidden by CSS, replaced with arrow image)
3757 		backText            : "«", // Link text used to move the slider back (hidden by CSS, replace with arrow image)
3758 		tooltipClass        : "tooltip", // Class added to navigation & start/stop button (text copied to title if it is hidden by a negative text indent)
3759 
3760 		// Function
3761 		enableArrows        : true,      // if false, arrows will be visible, but not clickable.
3762 		enableNavigation    : true,      // if false, navigation links will still be visible, but not clickable.
3763 		enableStartStop     : true,      // if false, the play/stop button will still be visible, but not clickable. Previously "enablePlay"
3764 		enableKeyboard      : true,      // if false, keyboard arrow keys will not work for this slider.
3765 
3766 		// Navigation
3767 		startPanel          : 1,         // This sets the initial panel
3768 		changeBy            : 1,         // Amount to go forward or back when changing panels.
3769 		hashTags            : true,      // Should links change the hashtag in the URL?
3770 		infiniteSlides      : true,      // if false, the slider will not wrap & not clone any panels
3771 		navigationFormatter : null,      // Details at the top of the file on this use (advanced use)
3772 		navigationSize      : false,     // Set this to the maximum number of visible navigation tabs; false to disable
3773 
3774 		// Slideshow options
3775 		autoPlay            : false,     // If true, the slideshow will start running; replaces "startStopped" option
3776 		autoPlayLocked      : false,     // If true, user changing slides will not stop the slideshow
3777 		autoPlayDelayed     : false,     // If true, starting a slideshow will delay advancing slides; if false, the slider will immediately advance to the next slide when slideshow starts
3778 		pauseOnHover        : true,      // If true & the slideshow is active, the slideshow will pause on hover
3779 		stopAtEnd           : false,     // If true & the slideshow is active, the slideshow will stop on the last page. This also stops the rewind effect when infiniteSlides is false.
3780 		playRtl             : false,     // If true, the slideshow will move right-to-left
3781 
3782 		// Times
3783 		delay               : 3000,      // How long between slideshow transitions in AutoPlay mode (in milliseconds)
3784 		resumeDelay         : 15000,     // Resume slideshow after user interaction, only if autoplayLocked is true (in milliseconds).
3785 		animationTime       : 600,       // How long the slideshow transition takes (in milliseconds)
3786 		delayBeforeAnimate  : 0,         // How long to pause slide animation before going to the desired slide (used if you want your "out" FX to show).
3787 
3788 /*
3789 		// Callbacks - commented out to reduce size of the minified version - they still work
3790 		onSliderResize      : function(e, slider) {}, // Callback when slider resizes
3791 		onBeforeInitialize  : function(e, slider) {}, // Callback before the plugin initializes
3792 		onInitialized       : function(e, slider) {}, // Callback when the plugin finished initializing
3793 		onShowStart         : function(e, slider) {}, // Callback on slideshow start
3794 		onShowStop          : function(e, slider) {}, // Callback after slideshow stops
3795 		onShowPause         : function(e, slider) {}, // Callback when slideshow pauses
3796 		onShowUnpause       : function(e, slider) {}, // Callback when slideshow unpauses - may not trigger properly if user clicks on any controls
3797 		onSlideInit         : function(e, slider) {}, // Callback when slide initiates, before control animation
3798 		onSlideBegin        : function(e, slider) {}, // Callback before slide animates
3799 		onSlideComplete     : function(slider) {},    // Callback when slide completes - no event variable!
3800 */
3801 
3802 		// Interactivity
3803 		clickForwardArrow   : "click",         // Event used to activate forward arrow functionality (e.g. add jQuery mobile's "swiperight")
3804 		clickBackArrow      : "click",         // Event used to activate back arrow functionality (e.g. add jQuery mobile's "swipeleft")
3805 		clickControls       : "click focusin", // Events used to activate navigation control functionality
3806 		clickSlideshow      : "click",         // Event used to activate slideshow play/stop button
3807 		allowRapidChange    : false,           // If true, allow rapid changing of the active pane, instead of ignoring activity during animation
3808 
3809 		// Video
3810 		resumeOnVideoEnd    : true,      // If true & the slideshow is active & a supported video is playing, it will pause the autoplay until the video is complete
3811 		resumeOnVisible     : true,      // If true the video will resume playing, if previously paused; if false, the video remains paused.
3812 		isVideoPlaying      : function(base){ return false; } // return true if video is playing or false if not - used by video extension
3813 
3814 		// deprecated - use the video extension wmode option now
3815 		// addWmodeToObject : "opaque"   // If your slider has a video supported by the extension, the script will automatically add a wmode parameter with this setting
3816 
3817 	};
3818 
3819 	$.fn.anythingSlider = function(options, callback) {
3820 
3821 		return this.each(function(){
3822 			var page, anySlide = $(this).data('AnythingSlider');
3823 
3824 			// initialize the slider but prevent multiple initializations
3825 			if ((typeof(options)).match('object|undefined')){
3826 				if (!anySlide) {
3827 					(new $.anythingSlider(this, options));
3828 				} else {
3829 					anySlide.updateSlider();
3830 				}
3831 			// If options is a number, process as an external link to page #: $(element).anythingSlider(#)
3832 			} else if (/\d/.test(options) && !isNaN(options) && anySlide) {
3833 				page = (typeof(options) === "number") ? options : parseInt($.trim(options),10); // accepts "  2  "
3834 				// ignore out of bound pages
3835 				if ( page >= 1 && page <= anySlide.pages ) {
3836 					anySlide.gotoPage(page, false, callback); // page #, autoplay, one time callback
3837 				}
3838 			// Accept id or class name
3839 			} else if (/^[#|.]/.test(options) && $(options).length) {
3840 				anySlide.gotoPage(options, false, callback);
3841 			}
3842 		});
3843 	};
3844 
3845 })(jQuery, window, document);
3846 /* ********************************************************************
3847  **********************************************************************
3848  * HTML Virtual Keyboard Interface Script - v1.49
3849  *   Copyright (c) 2011 - GreyWyvern
3850  *
3851  *  - Licenced for free distribution under the BSDL
3852  *          http://www.opensource.org/licenses/bsd-license.php
3853  *
3854  * Add a script-driven keyboard interface to text fields, password
3855  * fields and textareas.
3856  *
3857  * See http://www.greywyvern.com/code/javascript/keyboard for examples
3858  * and usage instructions.
3859  *
3860  * Version 1.49 - November 8, 2011
3861  *   - Don't display language drop-down if only one keyboard available
3862  *
3863  *   See full changelog at:
3864  *     http://www.greywyvern.com/code/javascript/keyboard.changelog.txt
3865  *
3866  * Keyboard Credits
3867  *   - Yiddish (Yidish Lebt) keyboard layout by Simche Taub (jidysz.net)
3868  *   - Urdu Phonetic keyboard layout by Khalid Malik
3869  *   - Yiddish keyboard layout by Helmut Wollmersdorfer
3870  *   - Khmer keyboard layout by Sovann Heng (km-kh.com)
3871  *   - Dari keyboard layout by Saif Fazel
3872  *   - Kurdish keyboard layout by Ara Qadir
3873  *   - Assamese keyboard layout by Kanchan Gogoi
3874  *   - Bulgarian BDS keyboard layout by Milen Georgiev
3875  *   - Basic Japanese Hiragana/Katakana keyboard layout by Damjan
3876  *   - Ukrainian keyboard layout by Dmitry Nikitin
3877  *   - Macedonian keyboard layout by Damjan Dimitrioski
3878  *   - Pashto keyboard layout by Ahmad Wali Achakzai (qamosona.com)
3879  *   - Armenian Eastern and Western keyboard layouts by Hayastan Project (www.hayastan.co.uk)
3880  *   - Pinyin keyboard layout from a collaboration with Lou Winklemann
3881  *   - Kazakh keyboard layout by Alex Madyankin
3882  *   - Danish keyboard layout by Verner Kjærsgaard
3883  *   - Slovak keyboard layout by Daniel Lara (www.learningslovak.com)
3884  *   - Belarusian and Serbian Cyrillic keyboard layouts by Evgeniy Titov
3885  *   - Bulgarian Phonetic keyboard layout by Samuil Gospodinov
3886  *   - Swedish keyboard layout by Håkan Sandberg
3887  *   - Romanian keyboard layout by Aurel
3888  *   - Farsi (Persian) keyboard layout by Kaveh Bakhtiyari (www.bakhtiyari.com)
3889  *   - Burmese keyboard layout by Cetanapa
3890  *   - Bosnian/Croatian/Serbian Latin/Slovenian keyboard layout by Miran Zeljko
3891  *   - Hungarian keyboard layout by Antal Sall 'Hiromacu'
3892  *   - Arabic keyboard layout by Srinivas Reddy
3893  *   - Italian and Spanish (Spain) keyboard layouts by dictionarist.com
3894  *   - Lithuanian and Russian keyboard layouts by Ramunas
3895  *   - German keyboard layout by QuHno
3896  *   - French keyboard layout by Hidden Evil
3897  *   - Polish Programmers layout by moose
3898  *   - Turkish keyboard layouts by offcu
3899  *   - Dutch and US Int'l keyboard layouts by jerone
3900  *
3901  */
3902 var VKI_attach, VKI_close;
3903 (function() {
3904   var self = this;
3905 
3906   this.VKI_version = "1.49";
3907   this.VKI_showVersion = true;
3908   this.VKI_target = false;
3909   this.VKI_shift = this.VKI_shiftlock = false;
3910   this.VKI_altgr = this.VKI_altgrlock = false;
3911   this.VKI_dead = false;
3912   this.VKI_deadBox = 0;//После предыдущих двух настроек уже и не искал. Николай Авдеев. true; // Show the dead keys checkbox
3913   this.VKI_deadkeysOn = false;  // Turn dead keys on by default
3914   this.VKI_numberPad = true;  // Allow user to open and close the number pad
3915   this.VKI_numberPadOn = false;  // Show number pad by default
3916   this.VKI_kts = this.VKI_kt = "Русский";  //Как дотянуться извне, не нашёл. Николай Авдеев.
3917   this.VKI_langAdapt = true;  // Use lang attribute of input to select keyboard
3918   this.VKI_size = 5;  // Default keyboard size (1-5) //Как дотянуться извне, не нашёл. Николай Авдеев.
3919   this.VKI_sizeAdj = true;  // Allow user to adjust keyboard size
3920   this.VKI_clearPasswords = false;  // Clear password fields on focus
3921   this.VKI_imageURI = "keyboard.png";  // If empty string, use imageless mode
3922   this.VKI_clickless = 0;  // 0 = disabled, > 0 = delay in ms
3923   this.VKI_activeTab = 0;  // Tab moves to next: 1 = element, 2 = keyboard enabled element
3924   this.VKI_enterSubmit = true;  // Submit forms when Enter is pressed
3925   this.VKI_keyCenter = 3;
3926 
3927   this.VKI_isIE = /*@cc_on!@*/false;
3928   this.VKI_isIE6 = /*@if(@_jscript_version == 5.6)!@end@*/false;
3929   this.VKI_isIElt8 = /*@if(@_jscript_version < 5.8)!@end@*/false;
3930   this.VKI_isWebKit = RegExp("KHTML").test(navigator.userAgent);
3931   this.VKI_isOpera = RegExp("Opera").test(navigator.userAgent);
3932   this.VKI_isMoz = (!this.VKI_isWebKit && navigator.product == "Gecko");
3933 
3934   /* ***** i18n text strings ************************************* */
3935   this.VKI_i18n = {
3936     '00': "Display Number Pad",
3937     '01': "Виртуальная клавиатура",
3938     '02': "Раскладка клавиатуры",
3939     '03': "Dead keys",
3940     '04': "Вкл",
3941     '05': "Выкл",
3942     '06': "Скрыть клавиатуру",
3943     '07': "Сброс",
3944     '08': "Очистить значение поля",
3945     '09': "Версия",
3946     '10': "Decrease keyboard size",
3947     '11': "Increase keyboard size"
3948   };
3949 
3950 
3951   /* ***** Create keyboards ************************************** */
3952   this.VKI_layout = {};
3953 
3954   // - Lay out each keyboard in rows of sub-arrays.  Each sub-array
3955   //   represents one key.
3956   //
3957   // - Each sub-array consists of four slots described as follows:
3958   //     example: ["a", "A", "\u00e1", "\u00c1"]
3959   //
3960   //          a) Normal character
3961   //          A) Character + Shift/Caps
3962   //     \u00e1) Character + Alt/AltGr/AltLk
3963   //     \u00c1) Character + Shift/Caps + Alt/AltGr/AltLk
3964   //
3965   //   You may include sub-arrays which are fewer than four slots.
3966   //   In these cases, the missing slots will be blanked when the
3967   //   corresponding modifier key (Shift or AltGr) is pressed.
3968   //
3969   // - If the second slot of a sub-array matches one of the following
3970   //   strings:
3971   //     "Tab", "Caps", "Shift", "Enter", "Bksp",
3972   //     "Alt" OR "AltGr", "AltLk"
3973   //   then the function of the key will be the following,
3974   //   respectively:
3975   //     - Insert a tab
3976   //     - Toggle Caps Lock (technically a Shift Lock)
3977   //     - Next entered character will be the shifted character
3978   //     - Insert a newline (textarea), or close the keyboard
3979   //     - Delete the previous character
3980   //     - Next entered character will be the alternate character
3981   //     - Toggle Alt/AltGr Lock
3982   //
3983   //   The first slot of this sub-array will be the text to display
3984   //   on the corresponding key.  This allows for easy localisation
3985   //   of key names.
3986   //
3987   // - Layout dead keys (diacritic + letter) should be added as
3988   //   property/value pairs of objects with hash keys equal to the
3989   //   diacritic.  See the "this.VKI_deadkey" object below the layout
3990   //   definitions.  In each property/value pair, the value is what
3991   //   the diacritic would change the property name to.
3992   //
3993   // - Note that any characters beyond the normal ASCII set should be
3994   //   entered in escaped Unicode format.  (eg \u00a3 = Pound symbol)
3995   //   You can find Unicode values for characters here:
3996   //     http://unicode.org/charts/
3997   //
3998   // - To remove a keyboard, just delete it, or comment it out of the
3999   //   source code. If you decide to remove the US International
4000   //   keyboard layout, make sure you change the default layout
4001   //   (this.VKI_kt) above so it references an existing layout.
4002 
4003   this.VKI_layout['\u0627\u0644\u0639\u0631\u0628\u064a\u0629'] = {
4004     'name': "Arabic", 'keys': [
4005       [["\u0630", "\u0651 "], ["1", "!", "\u00a1", "\u00b9"], ["2", "@", "\u00b2"], ["3", "#", "\u00b3"], ["4", "$", "\u00a4", "\u00a3"], ["5", "%", "\u20ac"], ["6", "^", "\u00bc"], ["7", "&", "\u00bd"], ["8", "*", "\u00be"], ["9", "(", "\u2018"], ["0", ")", "\u2019"], ["-", "_", "\u00a5"], ["=", "+", "\u00d7", "\u00f7"], ["Bksp", "Bksp"]],
4006       [["Tab", "Tab"], ["\u0636", "\u064e"], ["\u0635", "\u064b"], ["\u062b", "\u064f"], ["\u0642", "\u064c"], ["\u0641", "\u0644"], ["\u063a", "\u0625"], ["\u0639", "\u2018"], ["\u0647", "\u00f7"], ["\u062e", "\u00d7"], ["\u062d", "\u061b"], ["\u062c", "<"], ["\u062f", ">"], ["\\", "|"]],
4007       [["Caps", "Caps"], ["\u0634", "\u0650"], ["\u0633", "\u064d"], ["\u064a", "]"], ["\u0628", "["], ["\u0644", "\u0644"], ["\u0627", "\u0623"], ["\u062a", "\u0640"], ["\u0646", "\u060c"], ["\u0645", "/"], ["\u0643", ":"], ["\u0637", '"'], ["Enter", "Enter"]],
4008       [["Shift", "Shift"], ["\u0626", "~"], ["\u0621", "\u0652"], ["\u0624", "}"], ["\u0631", "{"], ["\u0644", "\u0644"], ["\u0649", "\u0622"], ["\u0629", "\u2019"], ["\u0648", ","], ["\u0632", "."], ["\u0638", "\u061f"], ["Shift", "Shift"]],
4009       [[" ", " ", " ", " "], ["Alt", "Alt"]]
4010     ], 'lang': ["ar"] };
4011 
4012   this.VKI_layout['\u0985\u09b8\u09ae\u09c0\u09df\u09be'] = {
4013     'name': "Assamese", 'keys': [
4014       [["+", "?"], ["\u09E7", "{", "\u09E7"], ["\u09E8", "}", "\u09E8"], ["\u09E9", "\u09CD\u09F0", "\u09E9"], ["\u09EA", "\u09F0\u09CD", "\u09EA"], ["\u09EB", "\u099C\u09CD\u09F0", "\u09EB"], ["\u09EC", "\u0995\u09CD\u09B7", "\u09EC"], ["\u09ED", "\u0995\u09CD\u09F0", "\u09ED"], ["\u09EE", "\u09B6\u09CD\u09F0", "\u09EE"], ["\u09EF", "(", "\u09EF"], ["\u09E6", ")", "\u09E6"], ["-", ""], ["\u09C3", "\u098B", "\u09E2", "\u09E0"], ["Bksp", "Bksp"]],
4015       [["Tab", "Tab"], ["\u09CC", "\u0994", "\u09D7"], ["\u09C8", "\u0990"], ["\u09BE", "\u0986"], ["\u09C0", "\u0988", "\u09E3", "\u09E1"], ["\u09C2", "\u098A"], ["\u09F1", "\u09AD"], ["\u09B9", "\u0999"], ["\u0997", "\u0998"], ["\u09A6", "\u09A7"], ["\u099C", "\u099D"], ["\u09A1", "\u09A2", "\u09DC", "\u09DD"], ["Enter", "Enter"]],
4016       [["Caps", "Caps"], ["\u09CB", "\u0993", "\u09F4", "\u09F5"], ["\u09C7", "\u098F", "\u09F6", "\u09F7"], ["\u09CD", "\u0985", "\u09F8", "\u09F9"], ["\u09BF", "\u0987", "\u09E2", "\u098C"], ["\u09C1", "\u0989"], ["\u09AA", "\u09AB"], ["\u09F0", "", "\u09F0", "\u09F1"], ["\u0995", "\u0996"], ["\u09A4", "\u09A5"], ["\u099A", "\u099B"], ["\u099F", "\u09A0"], ["\u09BC", "\u099E"]],
4017       [["Shift", "Shift"], ["\u09CE", "\u0983"], ["\u0982", "\u0981", "\u09FA"], ["\u09AE", "\u09A3"], ["\u09A8", "\u09F7"], ["\u09AC", "\""], ["\u09B2", "'"], ["\u09B8", "\u09B6"], [",", "\u09B7"], [".", ";"], ["\u09AF", "\u09DF"], ["Shift", "Shift"]],
4018       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4019     ], 'lang': ["as"] };
4020 
4021   this.VKI_layout['\u0410\u0437\u04d9\u0440\u0431\u0430\u0458\u04b9\u0430\u043d\u04b9\u0430'] = {
4022     'name': "Azerbaijani Cyrillic", 'keys': [
4023       [["`", "~"], ["1", "!"], ["2", '"'], ["3", "\u2116"], ["4", ";"], ["5", "%"], ["6", ":"], ["7", "?"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
4024       [["Tab", "Tab"], ["\u0458", "\u0408"], ["\u04AF", "\u04AE"], ["\u0443", "\u0423"], ["\u043A", "\u041A"], ["\u0435", "\u0415"], ["\u043D", "\u041D"], ["\u0433", "\u0413"], ["\u0448", "\u0428"], ["\u04BB", "\u04BA"], ["\u0437", "\u0417"], ["\u0445", "\u0425"], ["\u04B9", "\u04B8"], ["\\", "/"]],
4025       [["Caps", "Caps"], ["\u0444", "\u0424"], ["\u044B", "\u042B"], ["\u0432", "\u0412"], ["\u0430", "\u0410"], ["\u043F", "\u041F"], ["\u0440", "\u0420"], ["\u043E", "\u041E"], ["\u043B", "\u041B"], ["\u0434", "\u0414"], ["\u0436", "\u0416"], ["\u049D", "\u049C"], ["Enter", "Enter"]],
4026       [["Shift", "Shift"], ["\\", "|"], ["\u04D9", "\u04D8"], ["\u0447", "\u0427"], ["\u0441", "\u0421"], ["\u043C", "\u041C"], ["\u0438", "\u0418"], ["\u0442", "\u0422"], ["\u0493", "\u0492"], ["\u0431", "\u0411"], ["\u04E9", "\u04E8"], [".", ","], ["Shift", "Shift"]],
4027       [[" ", " "]]
4028     ], 'lang': ["az-Cyrl"] };
4029 
4030   this.VKI_layout['Az\u0259rbaycanca'] = {
4031     'name': "Azerbaijani Latin", 'keys': [
4032       [["`", "~"], ["1", "!"], ["2", '"'], ["3", "\u2166"], ["4", ";"], ["5", "%"], ["6", ":"], ["7", "?"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
4033       [["Tab", "Tab"], ["q", "Q"], ["\u00FC", "\u00DC"], ["e", "E"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "\u0130"], ["o", "O"], ["p", "P"], ["\u00F6", "\u00D6"], ["\u011F", "\u011E"], ["\\", "/"]],
4034       [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u0131", "I"], ["\u0259", "\u018F"], ["Enter", "Enter"]],
4035       [["Shift", "Shift"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], ["\u00E7", "\u00C7"], ["\u015F", "\u015E"], [".", ","], ["Shift", "Shift"]],
4036       [[" ", " "]]
4037     ], 'lang': ["az"] };
4038 
4039   this.VKI_layout['\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f'] = {
4040     'name': "Belarusian", 'keys': [
4041       [["\u0451", "\u0401"], ["1", "!"], ["2", '"'], ["3", "\u2116"], ["4", ";"], ["5", "%"], ["6", ":"], ["7", "?"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
4042       [["Tab", "Tab"], ["\u0439", "\u0419"], ["\u0446", "\u0426"], ["\u0443", "\u0423"], ["\u043a", "\u041a"], ["\u0435", "\u0415"], ["\u043d", "\u041d"], ["\u0433", "\u0413"], ["\u0448", "\u0428"], ["\u045e", "\u040e"], ["\u0437", "\u0417"], ["\u0445", "\u0425"], ["'", "'"], ["\\", "/"]],
4043       [["Caps", "Caps"], ["\u0444", "\u0424"], ["\u044b", "\u042b"], ["\u0432", "\u0412"], ["\u0430", "\u0410"], ["\u043f", "\u041f"], ["\u0440", "\u0420"], ["\u043e", "\u041e"], ["\u043b", "\u041b"], ["\u0434", "\u0414"], ["\u0436", "\u0416"], ["\u044d", "\u042d"], ["Enter", "Enter"]],
4044       [["Shift", "Shift"], ["/", "|"], ["\u044f", "\u042f"], ["\u0447", "\u0427"], ["\u0441", "\u0421"], ["\u043c", "\u041c"], ["\u0456", "\u0406"], ["\u0442", "\u0422"], ["\u044c", "\u042c"], ["\u0431", "\u0411"], ["\u044e", "\u042e"], [".", ","], ["Shift", "Shift"]],
4045       [[" ", " "]]
4046     ], 'lang': ["be"] };
4047 
4048   this.VKI_layout['Belgische / Belge'] = {
4049     'name': "Belgian", 'keys': [
4050       [["\u00b2", "\u00b3"], ["&", "1", "|"], ["\u00e9", "2", "@"], ['"', "3", "#"], ["'", "4"], ["(", "5"], ["\u00a7", "6", "^"], ["\u00e8", "7"], ["!", "8"], ["\u00e7", "9", "{"], ["\u00e0", "0", "}"], [")", "\u00b0"], ["-", "_"], ["Bksp", "Bksp"]],
4051       [["Tab", "Tab"], ["a", "A"], ["z", "Z"], ["e", "E", "\u20ac"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["^", "\u00a8", "["], ["$", "*", "]"], ["\u03bc", "\u00a3", "`"]],
4052       [["Caps", "Caps"], ["q", "Q"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["m", "M"], ["\u00f9", "%", "\u00b4"], ["Enter", "Enter"]],
4053       [["Shift", "Shift"], ["<", ">", "\\"], ["w", "W"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], [",", "?"], [";", "."], [":", "/"], ["=", "+", "~"], ["Shift", "Shift"]],
4054       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4055     ], 'lang': ["nl-BE", "fr-BE"] };
4056 
4057   this.VKI_layout['\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438 \u0424\u043e\u043d\u0435\u0442\u0438\u0447\u0435\u043d'] = {
4058     'name': "Bulgarian Phonetic", 'keys': [
4059       [["\u0447", "\u0427"], ["1", "!"], ["2", "@"], ["3", "#"], ["4", "$"], ["5", "%"], ["6", "^"], ["7", "&"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
4060       [["Tab", "Tab"], ["\u044F", "\u042F"], ["\u0432", "\u0412"], ["\u0435", "\u0415"], ["\u0440", "\u0420"], ["\u0442", "\u0422"], ["\u044A", "\u042A"], ["\u0443", "\u0423"], ["\u0438", "\u0418"], ["\u043E", "\u041E"], ["\u043F", "\u041F"], ["\u0448", "\u0428"], ["\u0449", "\u0429"], ["\u044E", "\u042E"]],
4061       [["Caps", "Caps"], ["\u0430", "\u0410"], ["\u0441", "\u0421"], ["\u0434", "\u0414"], ["\u0444", "\u0424"], ["\u0433", "\u0413"], ["\u0445", "\u0425"], ["\u0439", "\u0419"], ["\u043A", "\u041A"], ["\u043B", "\u041B"], [";", ":"], ["'", '"'], ["Enter", "Enter"]],
4062       [["Shift", "Shift"], ["\u0437", "\u0417"], ["\u044C", "\u042C"], ["\u0446", "\u0426"], ["\u0436", "\u0416"], ["\u0431", "\u0411"], ["\u043D", "\u041D"], ["\u043C", "\u041C"], [",", "<"], [".", ">"], ["/", "?"], ["Shift", "Shift"]],
4063       [[" ", " "]]
4064     ], 'lang': ["bg"] };
4065 
4066   this.VKI_layout['\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438'] = {
4067     'name': "Bulgarian BDS", 'keys': [
4068       [["`", "~"], ["1", "!"], ["2", "?"], ["3", "+"], ["4", '"'], ["5", "%"], ["6", "="], ["7", ":"], ["8", "/"], ["9", "_"], ["0", "\u2116"], ["-", "\u0406"], ["=", "V"], ["Bksp", "Bksp"]],
4069       [["Tab", "Tab"], [",", "\u044b"], ["\u0443", "\u0423"], ["\u0435", "\u0415"], ["\u0438", "\u0418"], ["\u0448", "\u0428"], ["\u0449", "\u0429"], ["\u043a", "\u041a"], ["\u0441", "\u0421"], ["\u0434", "\u0414"], ["\u0437", "\u0417"], ["\u0446", "\u0426"], [";", "\u00a7"], ["(", ")"]],
4070       [["Caps", "Caps"], ["\u044c", "\u042c"], ["\u044f", "\u042f"], ["\u0430", "\u0410"], ["\u043e", "\u041e"], ["\u0436", "\u0416"], ["\u0433", "\u0413"], ["\u0442", "\u0422"], ["\u043d", "\u041d"], ["\u0412", "\u0412"], ["\u043c", "\u041c"], ["\u0447", "\u0427"], ["Enter", "Enter"]],
4071       [["Shift", "Shift"], ["\u042e", "\u044e"], ["\u0439", "\u0419"], ["\u044a", "\u042a"], ["\u044d", "\u042d"], ["\u0444", "\u0424"], ["\u0445", "\u0425"], ["\u043f", "\u041f"], ["\u0440", "\u0420"], ["\u043b", "\u041b"], ["\u0431", "\u0411"], ["Shift", "Shift"]],
4072       [[" ", " "]]
4073     ]};
4074 
4075   this.VKI_layout['\u09ac\u09be\u0982\u09b2\u09be'] = {
4076     'name': "Bengali", 'keys': [
4077       [[""], ["1", "", "\u09E7"], ["2", "", "\u09E8"], ["3", "\u09CD\u09B0", "\u09E9"], ["4", "\u09B0\u09CD", "\u09EA"], ["5", "\u099C\u09CD\u09B0", "\u09EB"], ["6", "\u09A4\u09CD\u09B7", "\u09EC"], ["7", "\u0995\u09CD\u09B0", "\u09ED"], ["8", "\u09B6\u09CD\u09B0", "\u09EE"], ["9", "(", "\u09EF"], ["0", ")", "\u09E6"], ["-", "\u0983"], ["\u09C3", "\u098B", "\u09E2", "\u09E0"], ["Bksp", "Bksp"]],
4078       [["Tab", "Tab"], ["\u09CC", "\u0994", "\u09D7"], ["\u09C8", "\u0990"], ["\u09BE", "\u0986"], ["\u09C0", "\u0988", "\u09E3", "\u09E1"], ["\u09C2", "\u098A"], ["\u09AC", "\u09AD"], ["\u09B9", "\u0999"], ["\u0997", "\u0998"], ["\u09A6", "\u09A7"], ["\u099C", "\u099D"], ["\u09A1", "\u09A2", "\u09DC", "\u09DD"], ["Enter", "Enter"]],
4079       [["Caps", "Caps"], ["\u09CB", "\u0993", "\u09F4", "\u09F5"], ["\u09C7", "\u098F", "\u09F6", "\u09F7"], ["\u09CD", "\u0985", "\u09F8", "\u09F9"], ["\u09BF", "\u0987", "\u09E2", "\u098C"], ["\u09C1", "\u0989"], ["\u09AA", "\u09AB"], ["\u09B0", "", "\u09F0", "\u09F1"], ["\u0995", "\u0996"], ["\u09A4", "\u09A5"], ["\u099A", "\u099B"], ["\u099F", "\u09A0"], ["\u09BC", "\u099E"]],
4080       [["Shift", "Shift"], [""], ["\u0982", "\u0981", "\u09FA"], ["\u09AE", "\u09A3"], ["\u09A8"], ["\u09AC"], ["\u09B2"], ["\u09B8", "\u09B6"], [",", "\u09B7"], [".", "{"], ["\u09AF", "\u09DF"], ["Shift", "Shift"]],
4081       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4082     ], 'lang': ["bn"] };
4083 
4084   this.VKI_layout['Bosanski'] = {
4085     'name': "Bosnian", 'keys': [
4086       [["\u00B8", "\u00A8"], ["1", "!", "~"], ["2", '"', "\u02C7"], ["3", "#", "^"], ["4", "$", "\u02D8"], ["5", "%", "\u00B0"], ["6", "&", "\u02DB"], ["7", "/", "`"], ["8", "(", "\u02D9"], ["9", ")", "\u00B4"], ["0", "=", "\u02DD"], ["'", "?", "\u00A8"], ["+", "*", "\u00B8"], ["Bksp", "Bksp"]],
4087       [["Tab", "Tab"], ["q", "Q", "\\"], ["w", "W", "|"], ["e", "E", "\u20AC"], ["r", "R"], ["t", "T"], ["z", "Z"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u0161", "\u0160", "\u00F7"], ["\u0111", "\u0110", "\u00D7"], ["\u017E", "\u017D", "\u00A4"]],
4088       [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F", "["], ["g", "G", "]"], ["h", "H"], ["j", "J"], ["k", "K", "\u0142"], ["l", "L", "\u0141"], ["\u010D", "\u010C"], ["\u0107", "\u0106", "\u00DF"], ["Enter", "Enter"]],
4089       [["Shift", "Shift"], ["<", ">"], ["y", "Y"], ["x", "X"], ["c", "C"], ["v", "V", "@"], ["b", "B", "{"], ["n", "N", "}"], ["m", "M", "\u00A7"], [",", ";", "<"], [".", ":", ">"], ["-", "_", "\u00A9"], ["Shift", "Shift"]],
4090       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4091     ], 'lang': ["bs"] };
4092 
4093   this.VKI_layout['Canadienne-fran\u00e7aise'] = {
4094     'name': "Canadian French", 'keys': [
4095       [["#", "|", "\\"], ["1", "!", "\u00B1"], ["2", '"', "@"], ["3", "/", "\u00A3"], ["4", "$", "\u00A2"], ["5", "%", "\u00A4"], ["6", "?", "\u00AC"], ["7", "&", "\u00A6"], ["8", "*", "\u00B2"], ["9", "(", "\u00B3"], ["0", ")", "\u00BC"], ["-", "_", "\u00BD"], ["=", "+", "\u00BE"], ["Bksp", "Bksp"]],
4096       [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O", "\u00A7"], ["p", "P", "\u00B6"], ["^", "^", "["], ["\u00B8", "\u00A8", "]"], ["<", ">", "}"]],
4097       [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], [";", ":", "~"], ["`", "`", "{"], ["Enter", "Enter"]],
4098       [["Shift", "Shift"], ["\u00AB", "\u00BB", "\u00B0"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M", "\u00B5"], [",", "'", "\u00AF"], [".", ".", "\u00AD"], ["\u00E9", "\u00C9", "\u00B4"], ["Shift", "Shift"]],
4099       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4100     ], 'lang': ["fr-CA"] };
4101 
4102   this.VKI_layout['\u010cesky'] = {
4103     'name': "Czech", 'keys': [
4104       [[";", "\u00b0", "`", "~"], ["+", "1", "!"], ["\u011B", "2", "@"], ["\u0161", "3", "#"], ["\u010D", "4", "$"], ["\u0159", "5", "%"], ["\u017E", "6", "^"], ["\u00FD", "7", "&"], ["\u00E1", "8", "*"], ["\u00ED", "9", "("], ["\u00E9", "0", ")"], ["=", "%", "-", "_"], ["\u00B4", "\u02c7", "=", "+"], ["Bksp", "Bksp"]],
4105       [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20AC"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00FA", "/", "[", "{"], [")", "(", "]", "}"], ["\u00A8", "'", "\\", "|"]],
4106       [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u016F", '"', ";", ":"], ["\u00A7", "!", "\u00a4", "^"], ["Enter", "Enter"]],
4107       [["Shift", "Shift"], ["\\", "|", "", "\u02dd"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", "?", "<", "\u00d7"], [".", ":", ">", "\u00f7"], ["-", "_", "/", "?"], ["Shift", "Shift"]],
4108       [[" ", " ", " ", " "], ["Alt", "Alt"]]
4109     ], 'lang': ["cs"] };
4110 
4111   this.VKI_layout['Dansk'] = {
4112     'name': "Danish", 'keys': [
4113       [["\u00bd", "\u00a7"], ["1", "!"], ["2", '"', "@"], ["3", "#", "\u00a3"], ["4", "\u00a4", "$"], ["5", "%", "\u20ac"], ["6", "&"], ["7", "/", "{"], ["8", "(", "["], ["9", ")", "]"], ["0", "=", "}"], ["+", "?"], ["\u00b4", "`", "|"], ["Bksp", "Bksp"]],
4114       [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20ac"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00e5", "\u00c5"], ["\u00a8", "^", "~"], ["'", "*"]],
4115       [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00e6", "\u00c6"], ["\u00f8", "\u00d8"], ["Enter", "Enter"]],
4116       [["Shift", "Shift"], ["<", ">", "\\"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M", "\u03bc", "\u039c"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
4117       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4118     ], 'lang': ["da"] };
4119 
4120   this.VKI_layout['Deutsch'] = {
4121     'name': "German", 'keys': [
4122       [["^", "\u00b0"], ["1", "!"], ["2", '"', "\u00b2"], ["3", "\u00a7", "\u00b3"], ["4", "$"], ["5", "%"], ["6", "&"], ["7", "/", "{"], ["8", "(", "["], ["9", ")", "]"], ["0", "=", "}"], ["\u00df", "?", "\\"], ["\u00b4", "`"], ["Bksp", "Bksp"]],
4123       [["Tab", "Tab"], ["q", "Q", "@"], ["w", "W"], ["e", "E", "\u20ac"], ["r", "R"], ["t", "T"], ["z", "Z"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00fc", "\u00dc"], ["+", "*", "~"], ["#", "'"]],
4124       [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00f6", "\u00d6"], ["\u00e4", "\u00c4"], ["Enter", "Enter"]],
4125       [["Shift", "Shift"], ["<", ">", "\u00a6"], ["y", "Y"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M", "\u00b5"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
4126       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4127     ], 'lang': ["de"] };
4128 
4129   this.VKI_layout['Dingbats'] = {
4130     'name': "Dingbats", 'keys': [
4131       [["\u2764", "\u2765", "\u2766", "\u2767"], ["\u278a", "\u2780", "\u2776", "\u2768"], ["\u278b", "\u2781", "\u2777", "\u2769"], ["\u278c", "\u2782", "\u2778", "\u276a"], ["\u278d", "\u2783", "\u2779", "\u276b"], ["\u278e", "\u2784", "\u277a", "\u276c"], ["\u278f", "\u2785", "\u277b", "\u276d"], ["\u2790", "\u2786", "\u277c", "\u276e"], ["\u2791", "\u2787", "\u277d", "\u276f"], ["\u2792", "\u2788", "\u277e", "\u2770"], ["\u2793", "\u2789", "\u277f", "\u2771"], ["\u2795", "\u2796", "\u274c", "\u2797"], ["\u2702", "\u2704", "\u2701", "\u2703"], ["Bksp", "Bksp"]],
4132       [["Tab", "Tab"], ["\u2714", "\u2705", "\u2713"], ["\u2718", "\u2715", "\u2717", "\u2716"], ["\u271a", "\u2719", "\u271b", "\u271c"], ["\u271d", "\u271e", "\u271f", "\u2720"], ["\u2722", "\u2723", "\u2724", "\u2725"], ["\u2726", "\u2727", "\u2728", "\u2756"], ["\u2729", "\u272a", "\u272d", "\u2730"], ["\u272c", "\u272b", "\u272e", "\u272f"], ["\u2736", "\u2731", "\u2732", "\u2749"], ["\u273b", "\u273c", "\u273d", "\u273e"], ["\u2744", "\u2745", "\u2746", "\u2743"], ["\u2733", "\u2734", "\u2735", "\u2721"], ["\u2737", "\u2738", "\u2739", "\u273a"]],
4133       [["Caps", "Caps"], ["\u2799", "\u279a", "\u2798", "\u2758"], ["\u27b5", "\u27b6", "\u27b4", "\u2759"], ["\u27b8", "\u27b9", "\u27b7", "\u275a"], ["\u2794", "\u279c", "\u27ba", "\u27bb"], ["\u279d", "\u279e", "\u27a1", "\u2772"], ["\u27a9", "\u27aa", "\u27ab", "\u27ac"], ["\u27a4", "\u27a3", "\u27a2", "\u279b"], ["\u27b3", "\u27bc", "\u27bd", "\u2773"], ["\u27ad", "\u27ae", "\u27af", "\u27b1"], ["\u27a8", "\u27a6", "\u27a5", "\u27a7"], ["\u279f", "\u27a0", "\u27be", "\u27b2"], ["Enter", "Enter"]],
4134       [["Shift", "Shift"],  ["\u270c", "\u270b", "\u270a", "\u270d"], ["\u274f", "\u2750", "\u2751", "\u2752"], ["\u273f", "\u2740", "\u2741", "\u2742"], ["\u2747", "\u2748", "\u274a", "\u274b"], ["\u2757", "\u2755", "\u2762", "\u2763"], ["\u2753", "\u2754", "\u27b0", "\u27bf"], ["\u270f", "\u2710", "\u270e", "\u2774"], ["\u2712", "\u2711", "\u274d", "\u274e"], ["\u2709", "\u2706", "\u2708", "\u2707"], ["\u275b", "\u275d", "\u2761", "\u2775"], ["\u275c", "\u275e", "\u275f", "\u2760"], ["Shift", "Shift"]],
4135       [["AltLk", "AltLk"], [" ", " ", " ", " "], ["AltGr", "AltGr"]]
4136     ]};
4137 
4138   this.VKI_layout['\u078b\u07a8\u0788\u07ac\u0780\u07a8\u0784\u07a6\u0790\u07b0'] = {
4139     'name': "Divehi", 'keys': [
4140       [["`", "~"], ["1", "!"], ["2", "@"], ["3", "#"], ["4", "$"], ["5", "%"], ["6", "^"], ["7", "&"], ["8", "*"], ["9", ")"], ["0", "("], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
4141       [["Tab", "Tab"], ["\u07ab", "\u00d7"], ["\u07ae", "\u2019"], ["\u07a7", "\u201c"], ["\u07a9", "/"], ["\u07ad", ":"], ["\u078e", "\u07a4"], ["\u0783", "\u079c"], ["\u0789", "\u07a3"], ["\u078c", "\u07a0"], ["\u0780", "\u0799"], ["\u078d", "\u00f7"], ["[", "{"], ["]", "}"]],
4142       [["Caps", "Caps"], ["\u07a8", "<"], ["\u07aa", ">"], ["\u07b0", ".", ",", ","], ["\u07a6", "\u060c"], ["\u07ac", '"'], ["\u0788", "\u07a5"], ["\u0787", "\u07a2"], ["\u0782", "\u0798"], ["\u0786", "\u079a"], ["\u078a", "\u07a1"], ["\ufdf2", "\u061b", ";", ";"], ["Enter", "Enter"]],
4143       [["Shift", "Shift"], ["\\", "|"], ["\u0792", "\u0796"], ["\u0791", "\u0795"], ["\u0790", "\u078f"], ["\u0794", "\u0797", "\u200D"], ["\u0785", "\u079f", "\u200C"], ["\u078b", "\u079b", "\u200E"], ["\u0784", "\u079D", "\u200F"], ["\u0781", "\\"], ["\u0793", "\u079e"], ["\u07af", "\u061f"], ["Shift", "Shift"]],
4144       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4145     ], 'lang': ["dv"] };
4146 
4147   this.VKI_layout['Dvorak'] = {
4148     'name': "Dvorak", 'keys': [
4149       [["`", "~"], ["1", "!"], ["2", "@"], ["3", "#"], ["4", "$"], ["5", "%"], ["6", "^"], ["7", "&"], ["8", "*"], ["9", "("], ["0", ")"], ["[", "{"], ["]", "}"], ["Bksp", "Bksp"]],
4150       [["Tab", "Tab"], ["'", '"'], [",", "<"], [".", ">"], ["p", "P"], ["y", "Y"], ["f", "F"], ["g", "G"], ["c", "C"], ["r", "R"], ["l", "L"], ["/", "?"], ["=", "+"], ["\\", "|"]],
4151       [["Caps", "Caps"], ["a", "A"], ["o", "O"], ["e", "E"], ["u", "U"], ["i", "I"], ["d", "D"], ["h", "H"], ["t", "T"], ["n", "N"], ["s", "S"], ["-", "_"], ["Enter", "Enter"]],
4152       [["Shift", "Shift"], [";", ":"], ["q", "Q"], ["j", "J"], ["k", "K"], ["x", "X"], ["b", "B"], ["m", "M"], ["w", "W"], ["v", "V"], ["z", "Z"], ["Shift", "Shift"]],
4153       [[" ", " "]]
4154     ]};
4155 
4156   this.VKI_layout['\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac'] = {
4157     'name': "Greek", 'keys': [
4158       [["`", "~"], ["1", "!"], ["2", "@", "\u00b2"], ["3", "#", "\u00b3"], ["4", "$", "\u00a3"], ["5", "%", "\u00a7"], ["6", "^", "\u00b6"], ["7", "&"], ["8", "*", "\u00a4"], ["9", "(", "\u00a6"], ["0", ")", "\u00ba"], ["-", "_", "\u00b1"], ["=", "+", "\u00bd"], ["Bksp", "Bksp"]],
4159       [["Tab", "Tab"], [";", ":"], ["\u03c2", "^"], ["\u03b5", "\u0395"], ["\u03c1", "\u03a1"], ["\u03c4", "\u03a4"], ["\u03c5", "\u03a5"], ["\u03b8", "\u0398"], ["\u03b9", "\u0399"], ["\u03bf", "\u039f"], ["\u03c0", "\u03a0"], ["[", "{", "\u201c"], ["]", "}", "\u201d"], ["\\", "|", "\u00ac"]],
4160       [["Caps", "Caps"], ["\u03b1", "\u0391"], ["\u03c3", "\u03a3"], ["\u03b4", "\u0394"], ["\u03c6", "\u03a6"], ["\u03b3", "\u0393"], ["\u03b7", "\u0397"], ["\u03be", "\u039e"], ["\u03ba", "\u039a"], ["\u03bb", "\u039b"], ["\u0384", "\u00a8", "\u0385"], ["'", '"'], ["Enter", "Enter"]],
4161       [["Shift", "Shift"], ["<", ">"], ["\u03b6", "\u0396"], ["\u03c7", "\u03a7"], ["\u03c8", "\u03a8"], ["\u03c9", "\u03a9"], ["\u03b2", "\u0392"], ["\u03bd", "\u039d"], ["\u03bc", "\u039c"], [",", "<"], [".", ">"], ["/", "?"], ["Shift", "Shift"]],
4162       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4163     ], 'lang': ["el"] };
4164 
4165   this.VKI_layout['Eesti'] = {
4166     'name': "Estonian", 'keys': [
4167       [["\u02C7", "~"], ["1", "!"], ["2", '"', "@", "@"], ["3", "#", "\u00A3", "\u00A3"], ["4", "\u00A4", "$", "$"], ["5", "%", "\u20AC"], ["6", "&"], ["7", "/", "{", "{"], ["8", "(", "[", "["], ["9", ")", "]", "]"], ["0", "=", "}", "}"], ["+", "?", "\\", "\\"], ["\u00B4", "`"], ["Bksp", "Bksp"]],
4168       [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20AC"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00FC", "\u00DC"], ["\u00F5", "\u00D5", "\u00A7", "\u00A7"], ["'", "*", "\u00BD", "\u00BD"]],
4169       [["Caps", "Caps"], ["a", "A"], ["s", "S", "\u0161", "\u0160"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00F6", "\u00D6"], ["\u00E4", "\u00C4", "^", "^"], ["Enter", "Enter"]],
4170       [["Shift", "Shift"], ["<", ">", "|", "|"], ["z", "Z", "\u017E", "\u017D"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
4171       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4172     ], 'lang': ["et"] };
4173 
4174   this.VKI_layout['Espa\u00f1ol'] = {
4175     'name': "Spanish", 'keys': [
4176       [["\u00ba", "\u00aa", "\\"], ["1", "!", "|"], ["2", '"', "@"], ["3", "'", "#"], ["4", "$", "~"], ["5", "%", "\u20ac"], ["6", "&", "\u00ac"], ["7", "/"], ["8", "("], ["9", ")"], ["0", "="], ["'", "?"], ["\u00a1", "\u00bf"], ["Bksp", "Bksp"]],
4177       [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["`", "^", "["], ["+", "*", "]"], ["\u00e7", "\u00c7", "}"]],
4178       [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00f1", "\u00d1"], ["\u00b4", "\u00a8", "{"], ["Enter", "Enter"]],
4179       [["Shift", "Shift"], ["<", ">"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
4180       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4181     ], 'lang': ["es"] };
4182 
4183   this.VKI_layout['\u062f\u0631\u06cc'] = {
4184     'name': "Dari", 'keys': [
4185       [["\u200D", "\u00F7", "~"], ["\u06F1", "!", "`"], ["\u06F2", "\u066C", "@"], ["\u06F3", "\u066B", "#"], ["\u06F4", "\u060B", "$"], ["\u06F5", "\u066A", "%"], ["\u06F6", "\u00D7", "^"], ["\u06F7", "\u060C", "&"], ["\u06F8", "*", "\u2022"], ["\u06F9", ")", "\u200E"], ["\u06F0", "(", "\u200F"], ["-", "\u0640", "_"], ["=", "+"], ["Bksp", "Bksp"]],
4186       [["Tab", "Tab"], ["\u0636", "\u0652", "\u00B0"], ["\u0635", "\u064C"], ["\u062B", "\u064D", "\u20AC"], ["\u0642", "\u064B", "\uFD3E"], ["\u0641", "\u064F", "\uFD3F"], ["\u063A", "\u0650", "\u0656"], ["\u0639", "\u064E", "\u0659"], ["\u0647", "\u0651", "\u0655"], ["\u062E", "]", "'"], ["\u062D", "[", '"'], ["\u062C", "}", "\u0681"], ["\u0686", "{", "\u0685"], ["\\", "|", "?"]],
4187       [["Caps", "Caps"], ["\u0634", "\u0624", "\u069A"], ["\u0633", "\u0626", "\u06CD"], ["\u06CC", "\u064A", "\u0649"], ["\u0628", "\u0625", "\u06D0"], ["\u0644", "\u0623", "\u06B7"], ["\u0627", "\u0622", "\u0671"], ["\u062A", "\u0629", "\u067C"], ["\u0646", "\u00BB", "\u06BC"], ["\u0645", "\u00AB", "\u06BA"], ["\u06A9", ":", ";"], ["\u06AF", "\u061B", "\u06AB"], ["Enter", "Enter"]],
4188       [["Shift", "Shift"], ["\u0638", "\u0643", "\u06D2"], ["\u0637", "\u0653", "\u0691"], ["\u0632", "\u0698", "\u0696"], ["\u0631", "\u0670", "\u0693"], ["\u0630", "\u200C", "\u0688"], ["\u062F", "\u0654", "\u0689"], ["\u067E", "\u0621", "\u0679"], ["\u0648", ">", ","], [".", "<", "\u06C7"], ["/", "\u061F", "\u06C9"], ["Shift", "Shift"]],
4189       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4190     ], 'lang': ["fa-AF"] };
4191 
4192   this.VKI_layout['\u0641\u0627\u0631\u0633\u06cc'] = {
4193     'name': "Farsi", 'keys': [
4194       [["\u067e", "\u0651 "], ["1", "!", "\u00a1", "\u00b9"], ["2", "@", "\u00b2"], ["3", "#", "\u00b3"], ["4", "$", "\u00a4", "\u00a3"], ["5", "%", "\u20ac"], ["6", "^", "\u00bc"], ["7", "&", "\u00bd"], ["8", "*", "\u00be"], ["9", "(", "\u2018"], ["0", ")", "\u2019"], ["-", "_", "\u00a5"], ["=", "+", "\u00d7", "\u00f7"], ["Bksp", "Bksp"]],
4195       [["Tab", "Tab"], ["\u0636", "\u064e"], ["\u0635", "\u064b"], ["\u062b", "\u064f"], ["\u0642", "\u064c"], ["\u0641", "\u0644"], ["\u063a", "\u0625"], ["\u0639", "\u2018"], ["\u0647", "\u00f7"], ["\u062e", "\u00d7"], ["\u062d", "\u061b"], ["\u062c", "<"], ["\u0686", ">"], ["\u0698", "|"]],
4196       [["Caps", "Caps"], ["\u0634", "\u0650"], ["\u0633", "\u064d"], ["\u064a", "]"], ["\u0628", "["], ["\u0644", "\u0644"], ["\u0627", "\u0623"], ["\u062a", "\u0640"], ["\u0646", "\u060c"], ["\u0645", "\\"], ["\u06af", ":"], ["\u0643", '"'], ["Enter", "Enter"]],
4197       [["Shift", "Shift"], ["\u0638", "~"], ["\u0637", "\u0652"], ["\u0632", "}"], ["\u0631", "{"], ["\u0630", "\u0644"], ["\u062f", "\u0622"], ["\u0626", "\u0621"], ["\u0648", ","], [".", "."], ["/", "\u061f"], ["Shift", "Shift"]],
4198       [[" ", " ", " ", " "], ["Alt", "Alt"]]
4199     ], 'lang': ["fa"] };
4200 
4201   this.VKI_layout['F\u00f8royskt'] = {
4202     'name': "Faeroese", 'keys': [
4203       [["\u00BD", "\u00A7"], ["1", "!"], ["2", '"', "@"], ["3", "#", "\u00A3"], ["4", "\u00A4", "$"], ["5", "%", "\u20AC"], ["6", "&"], ["7", "/", "{"], ["8", "(", "["], ["9", ")", "]"], ["0", "=", "}"], ["+", "?"], ["\u00B4", "`", "|"], ["Bksp", "Bksp"]],
4204       [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20AC"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00E5", "\u00C5", "\u00A8"], ["\u00F0", "\u00D0", "~"], ["'", "*"]],
4205       [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00E6", "\u00C6"], ["\u00F8", "\u00D8", "^"], ["Enter", "Enter"]],
4206       [["Shift", "Shift"], ["<", ">", "\\"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M", "\u00B5"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
4207       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4208     ], 'lang': ["fo"] };
4209 
4210   this.VKI_layout['Fran\u00e7ais'] = {
4211     'name': "French", 'keys': [
4212       [["\u00b2", "\u00b3"], ["&", "1"], ["\u00e9", "2", "~"], ['"', "3", "#"], ["'", "4", "{"], ["(", "5", "["], ["-", "6", "|"], ["\u00e8", "7", "`"], ["_", "8", "\\"], ["\u00e7", "9", "^"], ["\u00e0", "0", "@"], [")", "\u00b0", "]"], ["=", "+", "}"], ["Bksp", "Bksp"]],
4213       [["Tab", "Tab"], ["a", "A"], ["z", "Z"], ["e", "E", "\u20ac"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["^", "\u00a8"], ["$", "\u00a3", "\u00a4"], ["*", "\u03bc"]],
4214       [["Caps", "Caps"], ["q", "Q"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["m", "M"], ["\u00f9", "%"], ["Enter", "Enter"]],
4215       [["Shift", "Shift"], ["<", ">"], ["w", "W"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], [",", "?"], [";", "."], [":", "/"], ["!", "\u00a7"], ["Shift", "Shift"]],
4216       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4217     ], 'lang': ["fr"] };
4218 
4219   this.VKI_layout['Gaeilge'] = {
4220     'name': "Irish / Gaelic", 'keys': [
4221       [["`", "\u00AC", "\u00A6", "\u00A6"], ["1", "!"], ["2", '"'], ["3", "\u00A3"], ["4", "$", "\u20AC"], ["5", "%"], ["6", "^"], ["7", "&"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
4222       [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u00E9", "\u00C9"], ["r", "R"], ["t", "T"], ["y", "Y", "\u00FD", "\u00DD"], ["u", "U", "\u00FA", "\u00DA"], ["i", "I", "\u00ED", "\u00CD"], ["o", "O", "\u00F3", "\u00D3"], ["p", "P"], ["[", "{"], ["]", "}"], ["#", "~"]],
4223       [["Caps", "Caps"], ["a", "A", "\u00E1", "\u00C1"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], [";", ":"], ["'", "@", "\u00B4", "`"], ["Enter", "Enter"]],
4224       [["Shift", "Shift"], ["\\", "|"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", "<"], [".", ">"], ["/", "?"], ["Shift", "Shift"]],
4225       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4226     ], 'lang': ["ga", "gd"] };
4227 
4228   this.VKI_layout['\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0'] = {
4229     'name': "Gujarati", 'keys': [
4230       [[""], ["1", "\u0A8D", "\u0AE7"], ["2", "\u0AC5", "\u0AE8"], ["3", "\u0ACD\u0AB0", "\u0AE9"], ["4", "\u0AB0\u0ACD", "\u0AEA"], ["5", "\u0A9C\u0ACD\u0A9E", "\u0AEB"], ["6", "\u0AA4\u0ACD\u0AB0", "\u0AEC"], ["7", "\u0A95\u0ACD\u0AB7", "\u0AED"], ["8", "\u0AB6\u0ACD\u0AB0", "\u0AEE"], ["9", "(", "\u0AEF"], ["0", ")", "\u0AE6"], ["-", "\u0A83"], ["\u0AC3", "\u0A8B", "\u0AC4", "\u0AE0"], ["Bksp", "Bksp"]],
4231       [["Tab", "Tab"], ["\u0ACC", "\u0A94"], ["\u0AC8", "\u0A90"], ["\u0ABE", "\u0A86"], ["\u0AC0", "\u0A88"], ["\u0AC2", "\u0A8A"], ["\u0AAC", "\u0AAD"], ["\u0AB9", "\u0A99"], ["\u0A97", "\u0A98"], ["\u0AA6", "\u0AA7"], ["\u0A9C", "\u0A9D"], ["\u0AA1", "\u0AA2"], ["\u0ABC", "\u0A9E"], ["\u0AC9", "\u0A91"]],
4232       [["Caps", "Caps"], ["\u0ACB", "\u0A93"], ["\u0AC7", "\u0A8F"], ["\u0ACD", "\u0A85"], ["\u0ABF", "\u0A87"], ["\u0AC1", "\u0A89"], ["\u0AAA", "\u0AAB"], ["\u0AB0"], ["\u0A95", "\u0A96"], ["\u0AA4", "\u0AA5"], ["\u0A9A", "\u0A9B"], ["\u0A9F", "\u0AA0"], ["Enter", "Enter"]],
4233       [["Shift", "Shift"], [""], ["\u0A82", "\u0A81", "", "\u0AD0"], ["\u0AAE", "\u0AA3"], ["\u0AA8"], ["\u0AB5"], ["\u0AB2", "\u0AB3"], ["\u0AB8", "\u0AB6"], [",", "\u0AB7"], [".", "\u0964", "\u0965", "\u0ABD"], ["\u0AAF"], ["Shift", "Shift"]],
4234       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4235     ], 'lang': ["gu"] };
4236 
4237   this.VKI_layout['\u05e2\u05d1\u05e8\u05d9\u05ea'] = {
4238     'name': "Hebrew", 'keys': [
4239       [["~", "`"], ["1", "!"], ["2", "@"], ["3", "#"], ["4" , "$", "\u20aa"], ["5" , "%"], ["6", "^"], ["7", "&"], ["8", "*"], ["9", ")"], ["0", "("], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
4240       [["Tab", "Tab"], ["/", "Q"], ["'", "W"], ["\u05e7", "E", "\u20ac"], ["\u05e8", "R"], ["\u05d0", "T"], ["\u05d8", "Y"], ["\u05d5", "U", "\u05f0"], ["\u05df", "I"], ["\u05dd", "O"], ["\u05e4", "P"], ["\\", "|"], ["Enter", "Enter"]],
4241       [["Caps", "Caps"], ["\u05e9", "A"], ["\u05d3", "S"], ["\u05d2", "D"], ["\u05db", "F"], ["\u05e2", "G"], ["\u05d9", "H", "\u05f2"], ["\u05d7", "J", "\u05f1"], ["\u05dc", "K"], ["\u05da", "L"], ["\u05e3", ":"], ["," , '"'], ["]", "}"], ["[", "{"]],
4242       [["Shift", "Shift"], ["\u05d6", "Z"], ["\u05e1", "X"], ["\u05d1", "C"], ["\u05d4", "V"], ["\u05e0", "B"], ["\u05de", "N"], ["\u05e6", "M"], ["\u05ea", ">"], ["\u05e5", "<"], [".", "?"], ["Shift", "Shift"]],
4243       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4244     ], 'lang': ["he"] };
4245 
4246   this.VKI_layout['\u0926\u0947\u0935\u0928\u093e\u0917\u0930\u0940'] = {
4247     'name': "Devanagari", 'keys': [
4248       [["\u094A", "\u0912"], ["1", "\u090D", "\u0967"], ["2", "\u0945", "\u0968"], ["3", "\u094D\u0930", "\u0969"], ["4", "\u0930\u094D", "\u096A"], ["5", "\u091C\u094D\u091E", "\u096B"], ["6", "\u0924\u094D\u0930", "\u096C"], ["7", "\u0915\u094D\u0937", "\u096D"], ["8", "\u0936\u094D\u0930", "\u096E"], ["9", "(", "\u096F"], ["0", ")", "\u0966"], ["-", "\u0903"], ["\u0943", "\u090B", "\u0944", "\u0960"], ["Bksp", "Bksp"]],
4249       [["Tab", "Tab"], ["\u094C", "\u0914"], ["\u0948", "\u0910"], ["\u093E", "\u0906"], ["\u0940", "\u0908", "\u0963", "\u0961"], ["\u0942", "\u090A"], ["\u092C", "\u092D"], ["\u0939", "\u0919"], ["\u0917", "\u0918", "\u095A"], ["\u0926", "\u0927"], ["\u091C", "\u091D", "\u095B"], ["\u0921", "\u0922", "\u095C", "\u095D"], ["\u093C", "\u091E"], ["\u0949", "\u0911"]],
4250       [["Caps", "Caps"], ["\u094B", "\u0913"], ["\u0947", "\u090F"], ["\u094D", "\u0905"], ["\u093F", "\u0907", "\u0962", "\u090C"], ["\u0941", "\u0909"], ["\u092A", "\u092B", "", "\u095E"], ["\u0930", "\u0931"], ["\u0915", "\u0916", "\u0958", "\u0959"], ["\u0924", "\u0925"], ["\u091A", "\u091B", "\u0952"], ["\u091F", "\u0920", "", "\u0951"], ["Enter", "Enter"]],
4251       [["Shift", "Shift"], ["\u0946", "\u090E", "\u0953"], ["\u0902", "\u0901", "", "\u0950"], ["\u092E", "\u0923", "\u0954"], ["\u0928", "\u0929"], ["\u0935", "\u0934"], ["\u0932", "\u0933"], ["\u0938", "\u0936"], [",", "\u0937", "\u0970"], [".", "\u0964", "\u0965", "\u093D"], ["\u092F", "\u095F"], ["Shift", "Shift"]],
4252       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4253     ], 'lang': ["hi-Deva"] };
4254 
4255   this.VKI_layout['\u0939\u093f\u0902\u0926\u0940'] = {
4256     'name': "Hindi", 'keys': [
4257       [["\u200d", "\u200c", "`", "~"], ["1", "\u090D", "\u0967", "!"], ["2", "\u0945", "\u0968", "@"], ["3", "\u094D\u0930", "\u0969", "#"], ["4", "\u0930\u094D", "\u096A", "$"], ["5", "\u091C\u094D\u091E", "\u096B", "%"], ["6", "\u0924\u094D\u0930", "\u096C", "^"], ["7", "\u0915\u094D\u0937", "\u096D", "&"], ["8", "\u0936\u094D\u0930", "\u096E", "*"], ["9", "(", "\u096F", "("], ["0", ")", "\u0966", ")"], ["-", "\u0903", "-", "_"], ["\u0943", "\u090B", "=", "+"], ["Bksp", "Bksp"]],
4258       [["Tab", "Tab"], ["\u094C", "\u0914"], ["\u0948", "\u0910"], ["\u093E", "\u0906"], ["\u0940", "\u0908"], ["\u0942", "\u090A"], ["\u092C", "\u092D"], ["\u0939", "\u0919"], ["\u0917", "\u0918"], ["\u0926", "\u0927"], ["\u091C", "\u091D"], ["\u0921", "\u0922", "[", "{"], ["\u093C", "\u091E", "]", "}"], ["\u0949", "\u0911", "\\", "|"]],
4259       [["Caps", "Caps"], ["\u094B", "\u0913"], ["\u0947", "\u090F"], ["\u094D", "\u0905"], ["\u093F", "\u0907"], ["\u0941", "\u0909"], ["\u092A", "\u092B"], ["\u0930", "\u0931"], ["\u0915", "\u0916"], ["\u0924", "\u0925"], ["\u091A", "\u091B", ";", ":"], ["\u091F", "\u0920", "'", '"'], ["Enter", "Enter"]],
4260       [["Shift", "Shift"], [""], ["\u0902", "\u0901", "", "\u0950"], ["\u092E", "\u0923"], ["\u0928"], ["\u0935"], ["\u0932", "\u0933"], ["\u0938", "\u0936"], [",", "\u0937", ",", "<"], [".", "\u0964", ".", ">"], ["\u092F", "\u095F", "/", "?"], ["Shift", "Shift"]],
4261       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4262     ], 'lang': ["hi"] };
4263 
4264   this.VKI_layout['Hrvatski'] = {
4265     'name': "Croatian", 'keys': this.VKI_layout['Bosanski'].keys.slice(0), 'lang': ["hr"]
4266   };
4267 
4268   this.VKI_layout['\u0540\u0561\u0575\u0565\u0580\u0565\u0576 \u0561\u0580\u0565\u0582\u0574\u0578\u0582\u057f\u0584'] = {
4269     'name': "Western Armenian", 'keys': [
4270       [["\u055D", "\u055C"], [":", "1"], ["\u0571", "\u0541"], ["\u0575", "\u0545"], ["\u055B", "3"], [",", "4"], ["-", "9"], [".", "\u0587"], ["\u00AB", "("], ["\u00BB", ")"], ["\u0585", "\u0555"], ["\u057C", "\u054C"], ["\u056A", "\u053A"], ["Bksp", "Bksp"]],
4271       [["Tab", "Tab"], ["\u056D", "\u053D"], ["\u057E", "\u054E"], ["\u0567", "\u0537"], ["\u0580", "\u0550"], ["\u0564", "\u0534"], ["\u0565", "\u0535"], ["\u0568", "\u0538"], ["\u056B", "\u053B"], ["\u0578", "\u0548"], ["\u0562", "\u0532"], ["\u0579", "\u0549"], ["\u057B", "\u054B"], ["'", "\u055E"]],
4272       [["Caps", "Caps"], ["\u0561", "\u0531"], ["\u057D", "\u054D"], ["\u057F", "\u054F"], ["\u0586", "\u0556"], ["\u056F", "\u053F"], ["\u0570", "\u0540"], ["\u0573", "\u0543"], ["\u0584", "\u0554"], ["\u056C", "\u053C"], ["\u0569", "\u0539"], ["\u0583", "\u0553"], ["Enter", "Enter"]],
4273       [["Shift", "Shift"], ["\u0566", "\u0536"], ["\u0581", "\u0551"], ["\u0563", "\u0533"], ["\u0582", "\u0552"], ["\u057A", "\u054A"], ["\u0576", "\u0546"], ["\u0574", "\u0544"], ["\u0577", "\u0547"], ["\u0572", "\u0542"], ["\u056E", "\u053E"], ["Shift", "Shift"]],
4274       [[" ", " "]]
4275     ], 'lang': ["hy-arevmda"] };
4276 
4277   this.VKI_layout['\u0540\u0561\u0575\u0565\u0580\u0565\u0576 \u0561\u0580\u0565\u0582\u0565\u056c\u0584'] = {
4278     'name': "Eastern Armenian", 'keys': [
4279       [["\u055D", "\u055C"], [":", "1"], ["\u0571", "\u0541"], ["\u0575", "\u0545"], ["\u055B", "3"], [",", "4"], ["-", "9"], [".", "\u0587"], ["\u00AB", "("], ["\u00BB", ")"], ["\u0585", "\u0555"], ["\u057C", "\u054C"], ["\u056A", "\u053A"], ["Bksp", "Bksp"]],
4280       [["Tab", "Tab"], ["\u056D", "\u053D"], ["\u0582", "\u0552"], ["\u0567", "\u0537"], ["\u0580", "\u0550"], ["\u057F", "\u054F"], ["\u0565", "\u0535"], ["\u0568", "\u0538"], ["\u056B", "\u053B"], ["\u0578", "\u0548"], ["\u057A", "\u054A"], ["\u0579", "\u0549"], ["\u057B", "\u054B"], ["'", "\u055E"]],
4281       [["Caps", "Caps"], ["\u0561", "\u0531"], ["\u057D", "\u054D"], ["\u0564", "\u0534"], ["\u0586", "\u0556"], ["\u0584", "\u0554"], ["\u0570", "\u0540"], ["\u0573", "\u0543"], ["\u056F", "\u053F"], ["\u056C", "\u053C"], ["\u0569", "\u0539"], ["\u0583", "\u0553"], ["Enter", "Enter"]],
4282       [["Shift", "Shift"], ["\u0566", "\u0536"], ["\u0581", "\u0551"], ["\u0563", "\u0533"], ["\u057E", "\u054E"], ["\u0562", "\u0532"], ["\u0576", "\u0546"], ["\u0574", "\u0544"], ["\u0577", "\u0547"], ["\u0572", "\u0542"], ["\u056E", "\u053E"], ["Shift", "Shift"]],
4283       [[" ", " "]]
4284     ], 'lang': ["hy"] };
4285 
4286   this.VKI_layout['\u00cdslenska'] = {
4287     'name': "Icelandic", 'keys': [
4288       [["\u00B0", "\u00A8", "\u00B0"], ["1", "!"], ["2", '"'], ["3", "#"], ["4", "$"], ["5", "%", "\u20AC"], ["6", "&"], ["7", "/", "{"], ["8", "(", "["], ["9", ")", "]"], ["0", "=", "}"], ["\u00F6", "\u00D6", "\\"], ["-", "_"], ["Bksp", "Bksp"]],
4289       [["Tab", "Tab"], ["q", "Q", "@"], ["w", "W"], ["e", "E", "\u20AC"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00F0", "\u00D0"], ["'", "?", "~"], ["+", "*", "`"]],
4290       [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00E6", "\u00C6"], ["\u00B4", "'", "^"], ["Enter", "Enter"]],
4291       [["Shift", "Shift"], ["<", ">", "|"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M", "\u00B5"], [",", ";"], [".", ":"], ["\u00FE", "\u00DE"], ["Shift", "Shift"]],
4292       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4293     ], 'lang': ["is"] };
4294 
4295   this.VKI_layout['Italiano'] = {
4296     'name': "Italian", 'keys': [
4297       [["\\", "|"], ["1", "!"], ["2", '"'], ["3", "\u00a3"], ["4", "$", "\u20ac"], ["5", "%"], ["6", "&"], ["7", "/"], ["8", "("], ["9", ")"], ["0", "="], ["'", "?"], ["\u00ec", "^"], ["Bksp", "Bksp"]],
4298       [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20ac"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00e8", "\u00e9", "[", "{"], ["+", "*", "]", "}"], ["\u00f9", "\u00a7"]],
4299       [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00f2", "\u00e7", "@"], ["\u00e0", "\u00b0", "#"], ["Enter", "Enter"]],
4300       [["Shift", "Shift"], ["<", ">"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
4301       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4302     ], 'lang': ["it"] };
4303 
4304   this.VKI_layout['\u65e5\u672c\u8a9e'] = {
4305     'name': "Japanese Hiragana/Katakana", 'keys': [
4306       [["\uff5e"], ["\u306c", "\u30cc"], ["\u3075", '\u30d5'], ["\u3042", "\u30a2", "\u3041", "\u30a1"], ["\u3046", "\u30a6", "\u3045", "\u30a5"], ["\u3048", "\u30a8", "\u3047", "\u30a7"], ["\u304a", "\u30aa", "\u3049", "\u30a9"], ["\u3084", "\u30e4", "\u3083", "\u30e3"], ["\u3086", "\u30e6", "\u3085", "\u30e5"], ["\u3088", "\u30e8", "\u3087", "\u30e7"], ["\u308f", "\u30ef", "\u3092", "\u30f2"], ["\u307b", "\u30db", "\u30fc", "\uff1d"], ["\u3078", "\u30d8" , "\uff3e", "\uff5e"], ["Bksp", "Bksp"]],
4307       [["Tab", "Tab"], ["\u305f", "\u30bf"], ["\u3066", "\u30c6"], ["\u3044", "\u30a4", "\u3043", "\u30a3"], ["\u3059", "\u30b9"], ["\u304b", "\u30ab"], ["\u3093", "\u30f3"], ["\u306a", "\u30ca"], ["\u306b", "\u30cb"], ["\u3089", "\u30e9"], ["\u305b", "\u30bb"], ["\u3001", "\u3001", "\uff20", "\u2018"], ["\u3002", "\u3002", "\u300c", "\uff5b"], ["\uffe5", "", "", "\uff0a"], ['\u309B', '"', "\uffe5", "\uff5c"]],
4308       [["Caps", "Caps"], ["\u3061", "\u30c1"], ["\u3068", "\u30c8"], ["\u3057", "\u30b7"], ["\u306f", "\u30cf"], ["\u304d", "\u30ad"], ["\u304f", "\u30af"], ["\u307e", "\u30de"], ["\u306e", "\u30ce"], ["\u308c", "\u30ec", "\uff1b", "\uff0b"], ["\u3051", "\u30b1", "\uff1a", "\u30f6"], ["\u3080", "\u30e0", "\u300d", "\uff5d"], ["Enter", "Enter"]],
4309       [["Shift", "Shift"], ["\u3064", "\u30c4"], ["\u3055", "\u30b5"], ["\u305d", "\u30bd"], ["\u3072", "\u30d2"], ["\u3053", "\u30b3"], ["\u307f", "\u30df"], ["\u3082", "\u30e2"], ["\u306d", "\u30cd", "\u3001", "\uff1c"], ["\u308b", "\u30eb", "\u3002", "\uff1e"], ["\u3081", "\u30e1", "\u30fb", "\uff1f"], ["\u308d", "\u30ed", "", "\uff3f"], ["Shift", "Shift"]],
4310       [["AltLk", "AltLk"], [" ", " ", " ", " "], ["Alt", "Alt"]]
4311     ], 'lang': ["ja"] };
4312 
4313   this.VKI_layout['\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8'] = {
4314     'name': "Georgian", 'keys': [
4315       [["\u201E", "\u201C"], ["!", "1"], ["?", "2"], ["\u2116", "3"], ["\u00A7", "4"], ["%", "5"], [":", "6"], [".", "7"], [";", "8"], [",", "9"], ["/", "0"], ["\u2013", "-"], ["=", "+"], ["Bksp", "Bksp"]],
4316       [["Tab", "Tab"], ["\u10E6", "\u10E6"], ["\u10EF", "\u10EF"], ["\u10E3", "\u10E3"], ["\u10D9", "\u10D9"], ["\u10D4", "\u10D4", "\u10F1"], ["\u10DC", "\u10DC"], ["\u10D2", "\u10D2"], ["\u10E8", "\u10E8"], ["\u10EC", "\u10EC"], ["\u10D6", "\u10D6"], ["\u10EE", "\u10EE", "\u10F4"], ["\u10EA", "\u10EA"], ["(", ")"]],
4317       [["Caps", "Caps"], ["\u10E4", "\u10E4", "\u10F6"], ["\u10EB", "\u10EB"], ["\u10D5", "\u10D5", "\u10F3"], ["\u10D7", "\u10D7"], ["\u10D0", "\u10D0"], ["\u10DE", "\u10DE"], ["\u10E0", "\u10E0"], ["\u10DD", "\u10DD"], ["\u10DA", "\u10DA"], ["\u10D3", "\u10D3"], ["\u10DF", "\u10DF"], ["Enter", "Enter"]],
4318       [["Shift", "Shift"], ["\u10ED", "\u10ED"], ["\u10E9", "\u10E9"], ["\u10E7", "\u10E7"], ["\u10E1", "\u10E1"], ["\u10DB", "\u10DB"], ["\u10D8", "\u10D8", "\u10F2"], ["\u10E2", "\u10E2"], ["\u10E5", "\u10E5"], ["\u10D1", "\u10D1"], ["\u10F0", "\u10F0", "\u10F5"], ["Shift", "Shift"]],
4319       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4320     ], 'lang': ["ka"] };
4321 
4322   this.VKI_layout['\u049a\u0430\u0437\u0430\u049b\u0448\u0430'] = {
4323     'name': "Kazakh", 'keys': [
4324       [["(", ")"], ['"', "!"], ["\u04d9", "\u04d8"], ["\u0456", "\u0406"], ["\u04a3", "\u04a2"], ["\u0493", "\u0492"], [",", ";"], [".", ":"], ["\u04af", "\u04ae"], ["\u04b1", "\u04b0"], ["\u049b", "\u049a"], ["\u04e9", "\u04e8"], ["\u04bb", "\u04ba"], ["Bksp", "Bksp"]],
4325       [["Tab", "Tab"], ["\u0439", "\u0419"], ["\u0446", "\u0426"], ["\u0443", "\u0423"], ["\u043A", "\u041A"], ["\u0435", "\u0415"], ["\u043D", "\u041D"], ["\u0433", "\u0413"], ["\u0448", "\u0428"], ["\u0449", "\u0429"], ["\u0437", "\u0417"], ["\u0445", "\u0425"], ["\u044A", "\u042A"], ["\\", "/"]],
4326       [["Caps", "Caps"], ["\u0444", "\u0424"], ["\u044B", "\u042B"], ["\u0432", "\u0412"], ["\u0430", "\u0410"], ["\u043F", "\u041F"], ["\u0440", "\u0420"], ["\u043E", "\u041E"], ["\u043B", "\u041B"], ["\u0434", "\u0414"], ["\u0436", "\u0416"], ["\u044D", "\u042D"], ["Enter", "Enter"]],
4327       [["Shift", "Shift"], ["\\", "|"], ["\u044F", "\u042F"], ["\u0447", "\u0427"], ["\u0441", "\u0421"], ["\u043C", "\u041C"], ["\u0438", "\u0418"], ["\u0442", "\u0422"], ["\u044C", "\u042C"], ["\u0431", "\u0411"], ["\u044E", "\u042E"], ["\u2116", "?"], ["Shift", "Shift"]],
4328       [[" ", " "]]
4329     ], 'lang': ["kk"] };
4330 
4331   this.VKI_layout['\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a'] = {
4332     'name': "Khmer", 'keys': [
4333       [["\u00AB", "\u00BB","\u200D"], ["\u17E1", "!","\u200C","\u17F1"], ["\u17E2", "\u17D7", "@", "\u17F2"], ["\u17E3", '"', "\u17D1", "\u17F3"], ["\u17E4", "\u17DB", "$", "\u17F4"], ["\u17E5", "%" ,"\u20AC", "\u17F5"], ["\u17E6", "\u17CD", "\u17D9", "\u17F6"], ["\u17E7", "\u17D0", "\u17DA", "\u17F7"], ["\u17E8", "\u17CF", "*", "\u17F8"], ["\u17E9", "(", "{", "\u17F9"], ["\u17E0", ")", "}", "\u17F0"], ["\u17A5", "\u17CC", "x"], ["\u17B2", "=", "\u17CE"], ["Bksp", "Bksp"]],
4334       [["Tab", "Tab"], ["\u1786", "\u1788", "\u17DC", "\u19E0"], ["\u17B9", "\u17BA", "\u17DD", "\u19E1"], ["\u17C1", "\u17C2", "\u17AF", "\u19E2"], ["\u179A", "\u17AC", "\u17AB", "\u19E3"], ["\u178F", "\u1791", "\u17A8", "\u19E4"], ["\u1799", "\u17BD", "\u1799\u17BE\u1784", "\u19E5"], ["\u17BB", "\u17BC", "", "\u19E6"], ["\u17B7", "\u17B8", "\u17A6", "\u19E7"], ["\u17C4", "\u17C5", "\u17B1", "\u19E8"], ["\u1795", "\u1797", "\u17B0", "\u19E9"], ["\u17C0", "\u17BF", "\u17A9", "\u19EA"], ["\u17AA", "\u17A7", "\u17B3", "\u19EB"], ["\u17AE", "\u17AD", "\\"]],
4335       [["Caps", "Caps"], ["\u17B6", "\u17B6\u17C6", "\u17B5", "\u19EC"], ["\u179F", "\u17C3", "", "\u19ED"], ["\u178A", "\u178C", "\u17D3", "\u19EE"], ["\u1790", "\u1792", "", "\u19EF"], ["\u1784", "\u17A2", "\u17A4", "\u19F0"], ["\u17A0", "\u17C7", "\u17A3", "\u19F1"], ["\u17D2", "\u1789", "\u17B4", "\u19F2"], ["\u1780", "\u1782", "\u179D", "\u19F3"], ["\u179B", "\u17A1", "\u17D8", "\u19F4"], ["\u17BE", "\u17C4\u17C7", "\u17D6", "\u19F5"], ["\u17CB", "\u17C9", "\u17C8", "\u19F6"], ["Enter", "Enter"]],
4336       [["Shift", "Shift"], ["\u178B", "\u178D", "|", "\u19F7"], ["\u1781", "\u1783", "\u1781\u17D2\u1789\u17BB\u17C6", "\u19F8"], ["\u1785", "\u1787", "-", "\u19F9"], ["\u179C", "\u17C1\u17C7", "+", "\u19FA"], ["\u1794", "\u1796", "\u179E", "\u19FB"], ["\u1793", "\u178E", "[", "\u19FC"], ["\u1798", "\u17C6", "]", "\u19FD"], ["\u17BB\u17C6", "\u17BB\u17C7", ",", "\u19FE"], ["\u17D4", "\u17D5", ".", "\u19FF"], ["\u17CA", "?", "/"], ["Shift", "Shift"]],
4337       [["\u200B", " ", "\u00A0", " "], ["AltGr", "AltGr"]]
4338     ], 'lang': ["km"] };
4339 
4340   this.VKI_layout['\u0c95\u0ca8\u0ccd\u0ca8\u0ca1'] = {
4341     'name': "Kannada", 'keys': [
4342       [["\u0CCA", "\u0C92"], ["1", "", "\u0CE7"], ["2", "", "\u0CE8"], ["3", "\u0CCD\u0CB0", "\u0CE9"], ["4", "\u0CB0\u0CCD", "\u0CEA"], ["5", "\u0C9C\u0CCD\u0C9E", "\u0CEB"], ["6", "\u0CA4\u0CCD\u0CB0", "\u0CEC"], ["7", "\u0C95\u0CCD\u0CB7", "\u0CED"], ["8", "\u0CB6\u0CCD\u0CB0", "\u0CEE"], ["9", "(", "\u0CEF"], ["0", ")", "\u0CE6"], ["-", "\u0C83"], ["\u0CC3", "\u0C8B", "\u0CC4", "\u0CE0"], ["Bksp", "Bksp"]],
4343       [["Tab", "Tab"], ["\u0CCC", "\u0C94"], ["\u0CC8", "\u0C90", "\u0CD6"], ["\u0CBE", "\u0C86"], ["\u0CC0", "\u0C88", "", "\u0CE1"], ["\u0CC2", "\u0C8A"], ["\u0CAC", "\u0CAD"], ["\u0CB9", "\u0C99"], ["\u0C97", "\u0C98"], ["\u0CA6", "\u0CA7"], ["\u0C9C", "\u0C9D"], ["\u0CA1", "\u0CA2"], ["Enter", "Enter"]],
4344       [["Caps", "Caps"], ["\u0CCB", "\u0C93"], ["\u0CC7", "\u0C8F", "\u0CD5"], ["\u0CCD", "\u0C85"], ["\u0CBF", "\u0C87", "", "\u0C8C"], ["\u0CC1", "\u0C89"], ["\u0CAA", "\u0CAB", "", "\u0CDE"], ["\u0CB0", "\u0CB1"], ["\u0C95", "\u0C96"], ["\u0CA4", "\u0CA5"], ["\u0C9A", "\u0C9B"], ["\u0C9F", "\u0CA0"], ["", "\u0C9E"]],
4345       [["Shift", "Shift"], ["\u0CC6", "\u0C8F"], ["\u0C82"], ["\u0CAE", "\u0CA3"], ["\u0CA8"], ["\u0CB5"], ["\u0CB2", "\u0CB3"], ["\u0CB8", "\u0CB6"], [",", "\u0CB7"], [".", "|"], ["\u0CAF"], ["Shift", "Shift"]],
4346       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4347     ], 'lang': ["kn"] };
4348 
4349   this.VKI_layout['\ud55c\uad6d\uc5b4'] = {
4350     'name': "Korean", 'keys': [
4351       [["`", "~", "`", "~"], ["1", "!", "1", "!"], ["2", "@", "2", "@"], ["3", "#", "3", "#"], ["4", "$", "4", "$"], ["5", "%", "5", "%"], ["6", "^", "6", "^"], ["7", "&", "7", "&"], ["8", "*", "8", "*"], ["9", ")", "9", ")"], ["0", "(", "0", "("], ["-", "_", "-", "_"], ["=", "+", "=", "+"], ["\u20A9", "|", "\u20A9", "|"], ["Bksp", "Bksp"]],
4352       [["Tab", "Tab"], ["\u1107", "\u1108", "q", "Q"], ["\u110C", "\u110D", "w", "W"], ["\u1103", "\u1104", "e", "E"], ["\u1100", "\u1101", "r", "R"], ["\u1109", "\u110A", "t", "T"], ["\u116D", "", "y", "Y"], ["\u1167", "", "u", "U"], ["\u1163", "", "i", "I"], ["\u1162", "\u1164", "o", "O"], ["\u1166", "\u1168", "p", "P"], ["[", "{", "[", "{"], ["]", "}", "]", "}"]],
4353       [["Caps", "Caps"], ["\u1106", "", "a", "A"], ["\u1102", "", "s", "S"], ["\u110B", "", "d", "D"], ["\u1105", "", "f", "F"], ["\u1112", "", "g", "G"], ["\u1169", "", "h", "H"], ["\u1165", "", "j", "J"], ["\u1161", "", "k", "K"], ["\u1175", "", "l", "L"], [";", ":", ";", ":"], ["'", '"', "'", '"'], ["Enter", "Enter"]],
4354       [["Shift", "Shift"], ["\u110F", "", "z", "Z"], ["\u1110", "", "x", "X"], ["\u110E", "", "c", "C"], ["\u1111", "", "v", "V"], ["\u1172", "", "b", "B"], ["\u116E", "", "n", "N"], ["\u1173", "", "m", "M"], [",", "<", ",", "<"], [".", ">", ".", ">"], ["/", "?", "/", "?"], ["Shift", "Shift"]],
4355       [[" ", " ", " ", " "], ["Kor", "Alt"]]
4356     ], 'lang': ["ko"] };
4357 
4358   this.VKI_layout['Kurd\u00ee'] = {
4359     'name': "Kurdish", 'keys': [
4360       [["\u20ac", "~"], ["\u0661", "!"], ["\u0662", "@"], ["\u0663", "#"], ["\u0664", "$"], ["\u0665", "%"], ["\u0666", "^"], ["\u0667", "&"], ["\u0668", "*"], ["\u0669", "("], ["\u0660", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
4361       [["Tab", "Tab"], ["\u0642", "`"], ["\u0648", "\u0648\u0648"], ["\u06d5", "\u064a"], ["\u0631", "\u0695"], ["\u062a", "\u0637"], ["\u06cc", "\u06ce"], ["\u0626", "\u0621"], ["\u062d", "\u0639"], ["\u06c6", "\u0624"], ["\u067e", "\u062b"], ["[", "{"], ["]", "}"], ["\\", "|"]],
4362       [["Caps", "Caps"], ["\u0627", "\u0622"], ["\u0633", "\u0634"], ["\u062f", "\u0630"], ["\u0641", "\u0625"], ["\u06af", "\u063a"], ["\u0647", "\u200c"], ["\u0698", "\u0623"], ["\u06a9", "\u0643"], ["\u0644", "\u06b5"], ["\u061b", ":"], ["'", '"'], ["Enter", "Enter"]],
4363       [["Shift", "Shift"], ["\u0632", "\u0636"], ["\u062e", "\u0635"], ["\u062c", "\u0686"], ["\u06a4", "\u0638"], ["\u0628", "\u0649"], ["\u0646", "\u0629"], ["\u0645", "\u0640"], ["\u060c", "<"], [".", ">"], ["/", "\u061f"], ["Shift", "Shift"]],
4364       [[" ", " "]]
4365     ], 'lang': ["ku"] };
4366 
4367   this.VKI_layout['\u041a\u044b\u0440\u0433\u044b\u0437\u0447\u0430'] = {
4368     'name': "Kyrgyz", 'keys': [
4369       [["\u0451", "\u0401"], ["1", "!"], ["2", '"'], ["3", "\u2116"], ["4", ";"], ["5", "%"], ["6", ":"], ["7", "?"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
4370       [["Tab", "Tab"], ["\u0439", "\u0419"], ["\u0446", "\u0426"], ["\u0443", "\u0423", "\u04AF", "\u04AE"], ["\u043A", "\u041A"], ["\u0435", "\u0415"], ["\u043D", "\u041D", "\u04A3", "\u04A2"], ["\u0433", "\u0413"], ["\u0448", "\u0428"], ["\u0449", "\u0429"], ["\u0437", "\u0417"], ["\u0445", "\u0425"], ["\u044A", "\u042A"], ["\\", "/"]],
4371       [["Caps", "Caps"], ["\u0444", "\u0424"], ["\u044B", "\u042B"], ["\u0432", "\u0412"], ["\u0430", "\u0410"], ["\u043F", "\u041F"], ["\u0440", "\u0420"], ["\u043E", "\u041E", "\u04E9", "\u04E8"], ["\u043B", "\u041B"], ["\u0434", "\u0414"], ["\u0436", "\u0416"], ["\u044D", "\u042D"], ["Enter", "Enter"]],
4372       [["Shift", "Shift"], ["\u044F", "\u042F"], ["\u0447", "\u0427"], ["\u0441", "\u0421"], ["\u043C", "\u041C"], ["\u0438", "\u0418"], ["\u0442", "\u0422"], ["\u044C", "\u042C"], ["\u0431", "\u0411"], ["\u044E", "\u042E"], [".", ","], ["Shift", "Shift"]],
4373       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4374     ], 'lang': ["ky"] };
4375 
4376   this.VKI_layout['Latvie\u0161u'] = {
4377     'name': "Latvian", 'keys': [
4378       [["\u00AD", "?"], ["1", "!", "\u00AB"], ["2", "\u00AB", "", "@"], ["3", "\u00BB", "", "#"], ["4", "$", "\u20AC", "$"], ["5", "%", '"', "~"], ["6", "/", "\u2019", "^"], ["7", "&", "", "\u00B1"], ["8", "\u00D7", ":"], ["9", "("], ["0", ")"], ["-", "_", "\u2013", "\u2014"], ["f", "F", "=", ";"], ["Bksp", "Bksp"]],
4379       [["Tab", "Tab"], ["\u016B", "\u016A", "q", "Q"], ["g", "G", "\u0123", "\u0122"], ["j", "J"], ["r", "R", "\u0157", "\u0156"], ["m", "M", "w", "W"], ["v", "V", "y", "Y"], ["n", "N"], ["z", "Z"], ["\u0113", "\u0112"], ["\u010D", "\u010C"], ["\u017E", "\u017D", "[", "{"], ["h", "H", "]", "}"], ["\u0137", "\u0136"]],
4380       [["Caps", "Caps"], ["\u0161", "\u0160"], ["u", "U"], ["s", "S"], ["i", "I"], ["l", "L"], ["d", "D"], ["a", "A"], ["t", "T"], ["e", "E", "\u20AC"], ["c", "C"], ["\u00B4", "\u00B0", "\u00B4", "\u00A8"], ["Enter", "Enter"]],
4381       [["Shift", "Shift"], ["\u0146", "\u0145"], ["b", "B", "x", "X"], ["\u012B", "\u012A"], ["k", "K", "\u0137", "\u0136"], ["p", "P"], ["o", "O", "\u00F5", "\u00D5"], ["\u0101", "\u0100"], [",", ";", "<"], [".", ":", ">"], ["\u013C", "\u013B"], ["Shift", "Shift"]],
4382       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4383     ], 'lang': ["lv"] };
4384 
4385   this.VKI_layout['Lietuvi\u0173'] = {
4386     'name': "Lithuanian", 'keys': [
4387       [["`", "~"], ["\u0105", "\u0104"], ["\u010D", "\u010C"], ["\u0119", "\u0118"], ["\u0117", "\u0116"], ["\u012F", "\u012E"], ["\u0161", "\u0160"], ["\u0173", "\u0172"], ["\u016B", "\u016A"], ["\u201E", "("], ["\u201C", ")"], ["-", "_"], ["\u017E", "\u017D"], ["Bksp", "Bksp"]],
4388       [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["[", "{"], ["]", "}"], ["\\", "|"]],
4389       [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], [";", ":"], ["'", '"'], ["Enter", "Enter"]],
4390       [["Shift", "Shift"], ["\u2013", "\u20AC"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", "<"], [".", ">"], ["/", "?"], ["Shift", "Shift"]],
4391       [[" ", " "]]
4392     ], 'lang': ["lt"] };
4393 
4394   this.VKI_layout['Magyar'] = {
4395     'name': "Hungarian", 'keys': [
4396       [["0", "\u00a7"], ["1", "'", "~"], ["2", '"', "\u02c7"], ["3", "+", "\u02c6"], ["4", "!", "\u02d8"], ["5", "%", "\u00b0"], ["6", "/", "\u02db"], ["7", "=", "`"], ["8", "(", "\u02d9"], ["9", ")", "\u00b4"], ["\u00f6", "\u00d6", "\u02dd"], ["\u00fc", "\u00dc", "\u00a8"], ["\u00f3", "\u00d3", "\u00b8"], ["Bksp", "Bksp"]],
4397       [["Tab", "Tab"], ["q", "Q", "\\"], ["w", "W", "|"], ["e", "E", "\u00c4"], ["r", "R"], ["t", "T"], ["z", "Z"], ["u", "U", "\u20ac"], ["i", "I", "\u00cd"], ["o", "O"], ["p", "P"], ["\u0151", "\u0150", "\u00f7"], ["\u00fa", "\u00da", "\u00d7"], ["\u0171", "\u0170", "\u00a4"]],
4398       [["Caps", "Caps"], ["a", "A", "\u00e4"], ["s", "S", "\u0111"], ["d", "D", "\u0110"], ["f", "F", "["], ["g", "G", "]"], ["h", "H"], ["j", "J", "\u00ed"], ["k", "K", "\u0141"], ["l", "L", "\u0142"], ["\u00e9", "\u00c9", "$"], ["\u00e1", "\u00c1", "\u00df"], ["Enter", "Enter"]],
4399       [["Shift", "Shift"], ["\u00ed", "\u00cd", "<"], ["y", "Y", ">"], ["x", "X", "#"], ["c", "C", "&"], ["v", "V", "@"], ["b", "B", "{"], ["n", "N", "}"], ["m", "M", "<"], [",", "?", ";"], [".", ":", ">"], ["-", "_", "*"], ["Shift", "Shift"]],
4400       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4401     ], 'lang': ["hu"] };
4402 
4403   this.VKI_layout['Malti'] = {
4404     'name': "Maltese 48", 'keys': [
4405       [["\u010B", "\u010A", "`"], ["1", "!"], ["2", '"'], ["3", "\u20ac", "\u00A3"], ["4", "$"], ["5", "%"], ["6", "^"], ["7", "&"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
4406       [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u00E8", "\u00C8"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U", "\u00F9", "\u00D9"], ["i", "I", "\u00EC", "\u00cc"], ["o", "O", "\u00F2", "\u00D2"], ["p", "P"], ["\u0121", "\u0120", "[", "{"], ["\u0127", "\u0126", "]", "}"], ["#", "\u017e"]],
4407       [["Caps", "Caps"], ["a", "A", "\u00E0", "\u00C0"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], [";", ":"], ["'", "@"], ["Enter", "Enter"]],
4408       [["Shift", "Shift"], ["\u017c", "\u017b", "\\", "|"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", "<"], [".", ">"], ["/", "?", "", "`"], ["Shift", "Shift"]],
4409       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4410     ], 'lang': ["mt"] };
4411 
4412   this.VKI_layout['\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438'] = {
4413     'name': "Macedonian Cyrillic", 'keys': [
4414       [["`", "~"], ["1", "!"], ["2", "\u201E"], ["3", "\u201C"], ["4", "\u2019"], ["5", "%"], ["6", "\u2018"], ["7", "&"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
4415       [["Tab", "Tab"], ["\u0459", "\u0409"], ["\u045A", "\u040A"], ["\u0435", "\u0415", "\u20AC"], ["\u0440", "\u0420"], ["\u0442", "\u0422"], ["\u0455", "\u0405"], ["\u0443", "\u0423"], ["\u0438", "\u0418"], ["\u043E", "\u041E"], ["\u043F", "\u041F"], ["\u0448", "\u0428", "\u0402"], ["\u0453", "\u0403", "\u0452"], ["\u0436", "\u0416"]],
4416       [["Caps", "Caps"], ["\u0430", "\u0410"], ["\u0441", "\u0421"], ["\u0434", "\u0414"], ["\u0444", "\u0424", "["], ["\u0433", "\u0413", "]"], ["\u0445", "\u0425"], ["\u0458", "\u0408"], ["\u043A", "\u041A"], ["\u043B", "\u041B"], ["\u0447", "\u0427", "\u040B"], ["\u045C", "\u040C", "\u045B"], ["Enter", "Enter"]],
4417       [["Shift", "Shift"], ["\u0451", "\u0401"], ["\u0437", "\u0417"], ["\u045F", "\u040F"], ["\u0446", "\u0426"], ["\u0432", "\u0412", "@"], ["\u0431", "\u0411", "{"], ["\u043D", "\u041D", "}"], ["\u043C", "\u041C", "\u00A7"], [",", ";"], [".", ":"], ["/", "?"], ["Shift", "Shift"]],
4418       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4419     ], 'lang': ["mk"] };
4420 
4421   this.VKI_layout['\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02'] = {
4422     'name': "Malayalam", 'keys': [
4423       [["\u0D4A", "\u0D12"], ["1", "", "\u0D67"], ["2", "", "\u0D68"], ["3", "\u0D4D\u0D30", "\u0D69"], ["4", "", "\u0D6A"], ["5", "", "\u0D6B"], ["6", "", "\u0D6C"], ["7", "\u0D15\u0D4D\u0D37", "\u0D6D"], ["8", "", "\u0D6E"], ["9", "(", "\u0D6F"], ["0", ")", "\u0D66"], ["-", "\u0D03"], ["\u0D43", "\u0D0B", "", "\u0D60"], ["Bksp", "Bksp"]],
4424       [["Tab", "Tab"], ["\u0D4C", "\u0D14", "\u0D57"], ["\u0D48", "\u0D10"], ["\u0D3E", "\u0D06"], ["\u0D40", "\u0D08", "", "\u0D61"], ["\u0D42", "\u0D0A"], ["\u0D2C", "\u0D2D"], ["\u0D39", "\u0D19"], ["\u0D17", "\u0D18"], ["\u0D26", "\u0D27"], ["\u0D1C", "\u0D1D"], ["\u0D21", "\u0D22"], ["", "\u0D1E"]],
4425       [["Caps", "Caps"], ["\u0D4B", "\u0D13"], ["\u0D47", "\u0D0F"], ["\u0D4D", "\u0D05", "", "\u0D0C"], ["\u0D3F", "\u0D07"], ["\u0D41", "\u0D09"], ["\u0D2A", "\u0D2B"], ["\u0D30", "\u0D31"], ["\u0D15", "\u0D16"], ["\u0D24", "\u0D25"], ["\u0D1A", "\u0D1B"], ["\u0D1F", "\u0D20"], ["Enter", "Enter"]],
4426       [["Shift", "Shift"], ["\u0D46", "\u0D0F"], ["\u0D02"], ["\u0D2E", "\u0D23"], ["\u0D28"], ["\u0D35", "\u0D34"], ["\u0D32", "\u0D33"], ["\u0D38", "\u0D36"], [",", "\u0D37"], ["."], ["\u0D2F"], ["Shift", "Shift"]],
4427       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4428     ], 'lang': ["ml"] };
4429 
4430   this.VKI_layout['Misc. Symbols'] = {
4431     'name': "Misc. Symbols", 'keys': [
4432       [["\u2605", "\u2606", "\u260e", "\u260f"], ["\u2648", "\u2673", "\u2659", "\u2630"], ["\u2649", "\u2674", "\u2658", "\u2631"], ["\u264a", "\u2675", "\u2657", "\u2632"], ["\u264b", "\u2676", "\u2656", "\u2633"], ["\u264c", "\u2677", "\u2655", "\u2634"], ["\u264d", "\u2678", "\u2654", "\u2635"], ["\u264e", "\u2679", "\u265f", "\u2636"], ["\u264f", "\u267a", "\u265e", "\u2637"], ["\u2650", "\u267b", "\u265d", "\u2686"], ["\u2651", "\u267c", "\u265c", "\u2687"], ["\u2652", "\u267d", "\u265b", "\u2688"], ["\u2653", "\u2672", "\u265a", "\u2689"], ["Bksp", "Bksp"]],
4433       [["\u263f", "\u2680", "\u268a", "\u26a2"], ["\u2640", "\u2681", "\u268b", "\u26a3"], ["\u2641", "\u2682", "\u268c", "\u26a4"], ["\u2642", "\u2683", "\u268d", "\u26a5"], ["\u2643", "\u2684", "\u268e", "\u26a6"], ["\u2644", "\u2685", "\u268f", "\u26a7"], ["\u2645", "\u2620", "\u26ff", "\u26a8"], ["\u2646", "\u2622", "\u2692", "\u26a9"], ["\u2647", "\u2623", "\u2693", "\u26b2"], ["\u2669", "\u266d", "\u2694", "\u26ac"], ["\u266a", "\u266e", "\u2695", "\u26ad"], ["\u266b", "\u266f", "\u2696", "\u26ae"], ["\u266c", "\u2607", "\u2697", "\u26af"], ["\u26f9", "\u2608", "\u2698", "\u26b0"], ["\u267f", "\u262e", "\u2638", "\u2609"]],
4434       [["Tab", "Tab"], ["\u261e", "\u261c", "\u261d", "\u261f"], ["\u261b", "\u261a", "\u2618", "\u2619"], ["\u2602", "\u2614", "\u26f1", "\u26d9"], ["\u2615", "\u2668", "\u26fe", "\u26d8"], ["\u263a", "\u2639", "\u263b", "\u26dc"], ["\u2617", "\u2616", "\u26ca", "\u26c9"], ["\u2660", "\u2663", "\u2665", "\u2666"], ["\u2664", "\u2667", "\u2661", "\u2662"], ["\u26c2", "\u26c0", "\u26c3", "\u26c1"], ["\u2624", "\u2625", "\u269a", "\u26b1"], ["\u2610", "\u2611", "\u2612", "\u2613"], ["\u2628", "\u2626", "\u2627", "\u2629"], ["\u262a", "\u262b", "\u262c", "\u262d"], ["\u26fa", "\u26fb", "\u26fc", "\u26fd"]],
4435       [["Caps", "Caps"], ["\u262f", "\u2670", "\u2671", "\u267e"], ["\u263c", "\u2699", "\u263d", "\u263e"], ["\u26c4", "\u2603", "\u26c7", "\u26c6"], ["\u26a0", "\u26a1", "\u2621", "\u26d4"], ["\u26e4", "\u26e5", "\u26e6", "\u26e7"], ["\u260a", "\u260b", "\u260c", "\u260d"], ["\u269c", "\u269b", "\u269d", "\u2604"], ["\u26b3", "\u26b4", "\u26b5", "\u26b6"], ["\u26b7", "\u26bf", "\u26b8", "\u26f8"], ["\u26b9", "\u26ba", "\u26bb", "\u26bc"], ["\u26bd", "\u26be", "\u269f", "\u269e"], ["Enter", "Enter"]],
4436       [["Shift", "Shift"], ["\u2600", "\u2601", "\u26c5", "\u26c8"], ["\u2691", "\u2690", "\u26ab", "\u26aa"], ["\u26cb", "\u26cc", "\u26cd", "\u26ce"], ["\u26cf", "\u26d0", "\u26d1", "\u26d2"], ["\u26d3", "\u26d5", "\u26d6", "\u26d7"], ["\u26da", "\u26db", "\u26dd", "\u26de"], ["\u26df", "\u26e0", "\u26e1", "\u26e2"], ["\u26e3", "\u26e8", "\u26e9", "\u26ea"], ["\u26eb", "\u26ec", "\u26ed", "\u26ee"], ["\u26ef", "\u26f0", "\u26f2", "\u26f3"], ["\u26f4", "\u26f5", "\u26f6", "\u26f7"], ["Shift", "Shift"]],
4437       [["AltLk", "AltLk"], [" ", " ", " ", " "], ["Alt", "Alt"]]
4438     ]};
4439 
4440   this.VKI_layout['\u041c\u043e\u043d\u0433\u043e\u043b'] = {
4441     'name': "Mongolian Cyrillic", 'keys': [
4442       [["=", "+"], ["\u2116", "1"], ["-", "2"], ['"', "3"], ["\u20AE", "4"], [":", "5"], [".", "6"], ["_", "7"], [",", "8"], ["%", "9"], ["?", "0"], ["\u0435", "\u0415"], ["\u0449", "\u0429"], ["Bksp", "Bksp"]],
4443       [["Tab", "Tab"], ["\u0444", "\u0424"], ["\u0446", "\u0426"], ["\u0443", "\u0423"], ["\u0436", "\u0416"], ["\u044d", "\u042d"], ["\u043D", "\u041D"], ["\u0433", "\u0413"], ["\u0448", "\u0428"], ["\u04af", "\u04AE"], ["\u0437", "\u0417"], ["\u043A", "\u041a"], ["\u044A", "\u042A"], ["\\", "|"]],
4444       [["Caps", "Caps"], ["\u0439", "\u0419"], ["\u044B", "\u042B"], ["\u0431", "\u0411"], ["\u04e9", "\u04e8"], ["\u0430", "\u0410"], ["\u0445", "\u0425"], ["\u0440", "\u0420"], ["\u043e", "\u041e"], ["\u043B", "\u041b"], ["\u0434", "\u0414"], ["\u043f", "\u041f"], ["Enter", "Enter"]],
4445       [["Shift", "Shift"], ["\u044F", "\u042F"], ["\u0447", "\u0427"], ["\u0451", "\u0401"], ["\u0441", "\u0421"], ["\u043c", "\u041c"], ["\u0438", "\u0418"], ["\u0442", "\u0422"], ["\u044c", "\u042c"], ["\u0432", "\u0412"], ["\u044e", "\u042e"], ["Shift", "Shift"]],
4446       [[" ", " "]]
4447     ], 'lang': ["mn"] };
4448 
4449   this.VKI_layout['\u092e\u0930\u093e\u0920\u0940'] = {
4450     'name': "Marathi", 'keys': [
4451       [["", "", "`", "~"], ["\u0967", "\u090D", "1", "!"], ["\u0968", "\u0945", "2", "@"], ["\u0969", "\u094D\u0930", "3", "#"], ["\u096A", "\u0930\u094D", "4", "$"], ["\u096B", "\u091C\u094D\u091E", "5", "%"], ["\u096C", "\u0924\u094D\u0930", "6", "^"], ["\u096D", "\u0915\u094D\u0937", "7", "&"], ["\u096E", "\u0936\u094D\u0930", "8", "*"], ["\u096F", "(", "9", "("], ["\u0966", ")", "0", ")"], ["-", "\u0903", "-", "_"], ["\u0943", "\u090B", "=", "+"], ["Bksp", "Bksp"]],
4452       [["Tab", "Tab"], ["\u094C", "\u0914"], ["\u0948", "\u0910"], ["\u093E", "\u0906"], ["\u0940", "\u0908"], ["\u0942", "\u090A"], ["\u092C", "\u092D"], ["\u0939", "\u0919"], ["\u0917", "\u0918"], ["\u0926", "\u0927"], ["\u091C", "\u091D"], ["\u0921", "\u0922", "[", "{"], ["\u093C", "\u091E", "]", "}"], ["\u0949", "\u0911", "\\", "|"]],
4453       [["Caps", "Caps"], ["\u094B", "\u0913"], ["\u0947", "\u090F"], ["\u094D", "\u0905"], ["\u093F", "\u0907"], ["\u0941", "\u0909"], ["\u092A", "\u092B"], ["\u0930", "\u0931"], ["\u0915", "\u0916"], ["\u0924", "\u0925"], ["\u091A", "\u091B", ";", ":"], ["\u091F", "\u0920", "'", '"'], ["Enter", "Enter"]],
4454       [["Shift", "Shift"], [""], ["\u0902", "\u0901", "", "\u0950"], ["\u092E", "\u0923"], ["\u0928"], ["\u0935"], ["\u0932", "\u0933"], ["\u0938", "\u0936"], [",", "\u0937", ",", "<"], [".", "\u0964", ".", ">"], ["\u092F", "\u095F", "/", "?"], ["Shift", "Shift"]],
4455       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4456     ], 'lang': ["mr"] };
4457 
4458   this.VKI_layout['\u1019\u103c\u1014\u103a\u1019\u102c\u1018\u102c\u101e\u102c'] = {
4459     'name': "Burmese", 'keys': [
4460       [["\u1039`", "~"], ["\u1041", "\u100D"], ["\u1042", "\u100E"], ["\u1043", "\u100B"], ["\u1044", "\u1000\u103B\u1015\u103A"], ["\u1045", "%"], ["\u1046", "/"], ["\u1047", "\u101B"], ["\u1048", "\u1002"], ["\u1049", "("], ["\u1040", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
4461       [["Tab", "Tab"], ["\u1006", "\u1029"], ["\u1010", "\u1040"], ["\u1014", "\u103F"], ["\u1019", "\u1023"], ["\u1021", "\u1024"], ["\u1015", "\u104C"], ["\u1000", "\u1009"], ["\u1004", "\u104D"], ["\u101E", "\u1025"], ["\u1005", "\u100F"], ["\u101F", "\u1027"], ["\u2018", "\u2019"], ["\u104F", "\u100B\u1039\u100C"]],
4462       [["Caps", "Caps"], ["\u200B\u1031", "\u1017"], ["\u200B\u103B", "\u200B\u103E"], ["\u200B\u102D", "\u200B\u102E"], ["\u200B\u103A", "\u1004\u103A\u1039\u200B"], ["\u200B\u102B", "\u200B\u103D"], ["\u200B\u1037", "\u200B\u1036"], ["\u200B\u103C", "\u200B\u1032"], ["\u200B\u102F", "\u200B\u102F"], ["\u200B\u1030", "\u200B\u1030"], ["\u200B\u1038", "\u200B\u102B\u103A"], ["\u1012", "\u1013"], ["Enter", "Enter"]],
4463       [["Shift", "Shift"], ["\u1016", "\u1007"], ["\u1011", "\u100C"], ["\u1001", "\u1003"], ["\u101C", "\u1020"], ["\u1018", "\u1026"], ["\u100A", "\u1008"], ["\u200B\u102C", "\u102A"], ["\u101A", "\u101B"], [".", "\u101B"], ["\u104B", "\u104A"], ["Shift", "Shift"]],
4464       [[" ", " "]]
4465     ], 'lang': ["my"] };
4466 
4467   this.VKI_layout['Nederlands'] = {
4468     'name': "Dutch", 'keys': [
4469       [["@", "\u00a7", "\u00ac"], ["1", "!", "\u00b9"], ["2", '"', "\u00b2"], ["3", "#", "\u00b3"], ["4", "$", "\u00bc"], ["5", "%", "\u00bd"], ["6", "&", "\u00be"], ["7", "_", "\u00a3"], ["8", "(", "{"], ["9", ")", "}"], ["0", "'"], ["/", "?", "\\"], ["\u00b0", "~", "\u00b8"], ["Bksp", "Bksp"]],
4470       [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20ac"], ["r", "R", "\u00b6"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00a8", "^"], ["*", "|"], ["<", ">"]],
4471       [["Caps", "Caps"], ["a", "A"], ["s", "S", "\u00df"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["+", "\u00b1"], ["\u00b4", "`"], ["Enter", "Enter"]],
4472       [["Shift", "Shift"], ["]", "[", "\u00a6"], ["z", "Z", "\u00ab"], ["x", "X", "\u00bb"], ["c", "C", "\u00a2"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M", "\u00b5"], [",", ";"], [".", ":", "\u00b7"], ["-", "="], ["Shift", "Shift"]],
4473       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4474     ], 'lang': ["nl"] };
4475 
4476   this.VKI_layout['Norsk'] = {
4477     'name': "Norwegian", 'keys': [
4478       [["|", "\u00a7"], ["1", "!"], ["2", '"', "@"], ["3", "#", "\u00a3"], ["4", "\u00a4", "$"], ["5", "%"], ["6", "&"], ["7", "/", "{"], ["8", "(", "["], ["9", ")", "]"], ["0", "=", "}"], ["+", "?"], ["\\", "`", "\u00b4"], ["Bksp", "Bksp"]],
4479       [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20ac"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00e5", "\u00c5"], ["\u00a8", "^", "~"], ["'", "*"]],
4480       [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00f8", "\u00d8"], ["\u00e6", "\u00c6"], ["Enter", "Enter"]],
4481       [["Shift", "Shift"], ["<", ">"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M", "\u03bc", "\u039c"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
4482       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4483     ], 'lang': ["no", "nb", "nn"] };
4484 
4485   this.VKI_layout['\u067e\u069a\u062a\u0648'] = {
4486     'name': "Pashto", 'keys': [
4487       [["\u200d", "\u00f7", "`"], ["\u06f1", "!", "`"], ["\u06f2", "\u066c", "@"], ["\u06f3", "\u066b", "\u066b"], ["\u06f4", "\u00a4", "\u00a3"], ["\u06f5", "\u066a", "%"], ["\u06f6", "\u00d7", "^"], ["\u06f7", "\u00ab", "&"], ["\u06f8", "\u00bb", "*"], ["\u06f9", "(", "\ufdf2"], ["\u06f0", ")", "\ufefb"], ["-", "\u0640", "_"], ["=", "+", "\ufe87", "\u00f7"], ["Bksp", "Bksp"]],
4488       [["Tab", "Tab"], ["\u0636", "\u0652", "\u06d5"], ["\u0635", "\u064c", "\u0653"], ["\u062b", "\u064d", "\u20ac"], ["\u0642", "\u064b", "\ufef7"], ["\u0641", "\u064f", "\ufef5"], ["\u063a", "\u0650", "'"], ["\u0639", "\u064e", "\ufe84"], ["\u0647", "\u0651", "\u0670"], ["\u062e", "\u0681", "'"], ["\u062d", "\u0685", '"'], ["\u062c", "]", "}"], ["\u0686", "[", "{"], ["\\", "\u066d", "|"]],
4489       [["Caps", "Caps"], ["\u0634", "\u069a", "\ufbb0"], ["\u0633", "\u06cd", "\u06d2"], ["\u06cc", "\u064a", "\u06d2"], ["\u0628", "\u067e", "\u06ba"], ["\u0644", "\u0623", "\u06b7"], ["\u0627", "\u0622", "\u0671"], ["\u062a", "\u067c", "\u0679"], ["\u0646", "\u06bc", "<"], ["\u0645", "\u0629", ">"], ["\u06a9", ":", "\u0643"], ["\u06af", "\u061b", "\u06ab"], ["Enter", "Enter"]],
4490       [["Shift", "Shift"], ["\u0638", "\u0626", "?"], ["\u0637", "\u06d0", ";"], ["\u0632", "\u0698", "\u0655"], ["\u0631", "\u0621", "\u0654"], ["\u0630", "\u200c", "\u0625"], ["\u062f", "\u0689", "\u0688"], ["\u0693", "\u0624", "\u0691"], ["\u0648", "\u060c", ","], ["\u0696", ".", "\u06c7"], ["/", "\u061f", "\u06c9"], ["Shift", "Shift", "\u064d"]],
4491       [[" ", " ", " ", " "], ["Alt", "Alt"]]
4492     ], 'lang': ["ps"] };
4493 
4494   this.VKI_layout['\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40'] = {
4495     'name': "Punjabi (Gurmukhi)", 'keys': [
4496       [[""], ["1", "\u0A4D\u0A35", "\u0A67", "\u0A67"], ["2", "\u0A4D\u0A2F", "\u0A68", "\u0A68"], ["3", "\u0A4D\u0A30", "\u0A69", "\u0A69"], ["4", "\u0A71", "\u0A6A", "\u0A6A"], ["5", "", "\u0A6B", "\u0A6B"], ["6", "", "\u0A6C", "\u0A6C"], ["7", "", "\u0A6D", "\u0A6D"], ["8", "", "\u0A6E", "\u0A6E"], ["9", "(", "\u0A6F", "\u0A6F"], ["0", ")", "\u0A66", "\u0A66"], ["-"], [""], ["Bksp", "Bksp"]],
4497       [["Tab", "Tab"], ["\u0A4C", "\u0A14"], ["\u0A48", "\u0A10"], ["\u0A3E", "\u0A06"], ["\u0A40", "\u0A08"], ["\u0A42", "\u0A0A"], ["\u0A2C", "\u0A2D"], ["\u0A39", "\u0A19"], ["\u0A17", "\u0A18", "\u0A5A", "\u0A5A"], ["\u0A26", "\u0A27"], ["\u0A1C", "\u0A1D", "\u0A5B", "\u0A5B"], ["\u0A21", "\u0A22", "\u0A5C", "\u0A5C"], ["Enter", "Enter"]],
4498       [["Caps", "Caps"], ["\u0A4B", "\u0A13"], ["\u0A47", "\u0A0F"], ["\u0A4D", "\u0A05"], ["\u0A3F", "\u0A07"], ["\u0A41", "\u0A09"], ["\u0A2A", "\u0A2B", "\u0A5E", "\u0A5E"], ["\u0A30"], ["\u0A15", "\u0A16", "\u0A59", "\u0A59"], ["\u0A24", "\u0A25"], ["\u0A1A", "\u0A1B"], ["\u0A1F", "\u0A20"], ["\u0A3C", "\u0A1E"]],
4499       [["Shift", "Shift"], [""], ["\u0A02", "\u0A02"], ["\u0A2E", "\u0A23"], ["\u0A28"], ["\u0A35", "\u0A72", "\u0A73", "\u0A73"], ["\u0A32", "\u0A33"], ["\u0A38", "\u0A36"], [","], [".", "|", "\u0965", "\u0965"], ["\u0A2F"], ["Shift", "Shift"]],
4500       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4501     ], 'lang': ["pa"] };
4502 
4503   this.VKI_layout['\u62fc\u97f3 (Pinyin)'] = {
4504     'name': "Pinyin", 'keys': [
4505       [["`", "~", "\u4e93", "\u301C"], ["1", "!", "\uFF62"], ["2", "@", "\uFF63"], ["3", "#", "\u301D"], ["4", "$", "\u301E"], ["5", "%", "\u301F"], ["6", "^", "\u3008"], ["7", "&", "\u3009"], ["8", "*", "\u302F"], ["9", "(", "\u300A"], ["0", ")", "\u300B"], ["-", "_", "\u300E"], ["=", "+", "\u300F"], ["Bksp", "Bksp"]],
4506       [["Tab", "Tab"], ["q", "Q", "\u0101", "\u0100"], ["w", "W", "\u00E1", "\u00C1"], ["e", "E", "\u01CE", "\u01CD"], ["r", "R", "\u00E0", "\u00C0"], ["t", "T", "\u0113", "\u0112"], ["y", "Y", "\u00E9", "\u00C9"], ["u", "U", "\u011B", "\u011A"], ["i", "I", "\u00E8", "\u00C8"], ["o", "O", "\u012B", "\u012A"], ["p", "P", "\u00ED", "\u00CD"], ["[", "{", "\u01D0", "\u01CF"], ["]", "}", "\u00EC", "\u00CC"], ["\\", "|", "\u3020"]],
4507       [["Caps", "Caps"], ["a", "A", "\u014D", "\u014C"], ["s", "S", "\u00F3", "\u00D3"], ["d", "D", "\u01D2", "\u01D1"], ["f", "F", "\u00F2", "\u00D2"], ["g", "G", "\u00fc", "\u00dc"], ["h", "H", "\u016B", "\u016A"], ["j", "J", "\u00FA", "\u00DA"], ["k", "K", "\u01D4", "\u01D3"], ["l", "L", "\u00F9", "\u00D9"], [";", ":"], ["'", '"'], ["Enter", "Enter"]],
4508       [["Shift", "Shift"], ["z", "Z", "\u01D6", "\u01D5"], ["x", "X", "\u01D8", "\u01D7"], ["c", "C", "\u01DA", "\u01D9"], ["v", "V", "\u01DC", "\u01DB"], ["b", "B"], ["n", "N"], ["m", "M"], [",", "<", "\u3001"], [".", ">", "\u3002"], ["/", "?"], ["Shift", "Shift"]],
4509       [["AltLk", "AltLk"], [" ", " ", " ", " "], ["Alt", "Alt"]]
4510     ], 'lang': ["zh-Latn"] };
4511 
4512   this.VKI_layout['Polski'] = {
4513     'name': "Polish (214)", 'keys': [
4514       [["\u02DB", "\u00B7"], ["1", "!", "~"], ["2", '"', "\u02C7"], ["3", "#", "^"], ["4", "\u00A4", "\u02D8"], ["5", "%", "\u00B0"], ["6", "&", "\u02DB"], ["7", "/", "`"], ["8", "(", "\u00B7"], ["9", ")", "\u00B4"], ["0", "=", "\u02DD"], ["+", "?", "\u00A8"], ["'", "*", "\u00B8"], ["Bksp", "Bksp"]],
4515       [["Tab", "Tab"], ["q", "Q", "\\"], ["w", "W", "\u00A6"], ["e", "E"], ["r", "R"], ["t", "T"], ["z", "Z"], ["u", "U", "\u20AC"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u017C", "\u0144", "\u00F7"], ["\u015B", "\u0107", "\u00D7"], ["\u00F3", "\u017A"]],
4516       [["Caps", "Caps"], ["a", "A"], ["s", "S", "\u0111"], ["d", "D", "\u0110"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u0142", "\u0141", "$"], ["\u0105", "\u0119", "\u00DF"], ["Enter", "Enter"]],
4517       [["Shift", "Shift"], ["<", ">"], ["y", "Y"], ["x", "X"], ["c", "C"], ["v", "V", "@"], ["b", "B", "{"], ["n", "N", "}"], ["m", "M", "\u00A7"], [",", ";", "<"], [".", ":", ">"], ["-", "_"], ["Shift", "Shift"]],
4518       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4519     ]};
4520 
4521   this.VKI_layout['Polski Programisty'] = {
4522     'name': "Polish Programmers", 'keys': [
4523       [["`", "~"], ["1", "!"], ["2", "@"], ["3", "#"], ["4", "$"], ["5", "%"], ["6", "^"], ["7", "&"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
4524       [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u0119", "\u0118"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O", "\u00f3", "\u00d3"], ["p", "P"], ["[", "{"], ["]", "}"], ["\\", "|"]],
4525       [["Caps", "Caps"], ["a", "A", "\u0105", "\u0104"], ["s", "S", "\u015b", "\u015a"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L", "\u0142", "\u0141"], [";", ":"], ["'", '"'], ["Enter", "Enter"]],
4526       [["Shift", "Shift"], ["z", "Z", "\u017c", "\u017b"], ["x", "X", "\u017a", "\u0179"], ["c", "C", "\u0107", "\u0106"], ["v", "V"], ["b", "B"], ["n", "N", "\u0144", "\u0143"], ["m", "M"], [",", "<"], [".", ">"], ["/", "?"], ["Shift", "Shift"]],
4527       [[" ", " ", " ", " "], ["Alt", "Alt"]]
4528     ], 'lang': ["pl"] };
4529 
4530   this.VKI_layout['Portugu\u00eas Brasileiro'] = {
4531     'name': "Portuguese (Brazil)", 'keys': [
4532       [["'", '"'], ["1", "!", "\u00b9"], ["2", "@", "\u00b2"], ["3", "#", "\u00b3"], ["4", "$", "\u00a3"], ["5", "%", "\u00a2"], ["6", "\u00a8", "\u00ac"], ["7", "&"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+", "\u00a7"], ["Bksp", "Bksp"]],
4533       [["Tab", "Tab"], ["q", "Q", "/"], ["w", "W", "?"], ["e", "E", "\u20ac"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00b4", "`"], ["[", "{", "\u00aa"], ["Enter", "Enter"]],
4534       [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00e7", "\u00c7"], ["~", "^"], ["]", "}", "\u00ba"], ["/", "?"]],
4535       [["Shift", "Shift"], ["\\", "|"], ["z", "Z"], ["x", "X"], ["c", "C", "\u20a2"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", "<"], [".", ">"], [":", ":"], ["Shift", "Shift"]],
4536       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4537     ], 'lang': ["pt-BR"] };
4538 
4539   this.VKI_layout['Portugu\u00eas'] = {
4540     'name': "Portuguese", 'keys': [
4541       [["\\", "|"], ["1", "!"], ["2", '"', "@"], ["3", "#", "\u00a3"], ["4", "$", "\u00a7"], ["5", "%"], ["6", "&"], ["7", "/", "{"], ["8", "(", "["], ["9", ")", "]"], ["0", "=", "}"], ["'", "?"], ["\u00ab", "\u00bb"], ["Bksp", "Bksp"]],
4542       [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20ac"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["+", "*", "\u00a8"], ["\u00b4", "`"], ["~", "^"]],
4543       [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00e7", "\u00c7"], ["\u00ba", "\u00aa"], ["Enter", "Enter"]],
4544       [["Shift", "Shift"], ["<", ">", "\\"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
4545       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4546     ], 'lang': ["pt"] };
4547 
4548   this.VKI_layout['Rom\u00e2n\u0103'] = {
4549     'name': "Romanian", 'keys': [
4550       [["\u201E", "\u201D", "`", "~"], ["1", "!", "~"], ["2", "@", "\u02C7"], ["3", "#", "^"], ["4", "$", "\u02D8"], ["5", "%", "\u00B0"], ["6", "^", "\u02DB"], ["7", "&", "`"], ["8", "*", "\u02D9"], ["9", "(", "\u00B4"], ["0", ")", "\u02DD"], ["-", "_", "\u00A8"], ["=", "+", "\u00B8", "\u00B1"], ["Bksp", "Bksp"]],
4551       [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20AC"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P", "\u00A7"], ["\u0103", "\u0102", "[", "{"], ["\u00EE", "\u00CE", "]", "}"], ["\u00E2", "\u00C2", "\\", "|"]],
4552       [["Caps", "Caps"], ["a", "A"], ["s", "S", "\u00df"], ["d", "D", "\u00f0", "\u00D0"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L", "\u0142", "\u0141"], [(this.VKI_isIElt8) ? "\u015F" : "\u0219", (this.VKI_isIElt8) ? "\u015E" : "\u0218", ";", ":"], [(this.VKI_isIElt8) ? "\u0163" : "\u021B", (this.VKI_isIElt8) ? "\u0162" : "\u021A", "\'", "\""], ["Enter", "Enter"]],
4553       [["Shift", "Shift"], ["\\", "|"], ["z", "Z"], ["x", "X"], ["c", "C", "\u00A9"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", ";", "<", "\u00AB"], [".", ":", ">", "\u00BB"], ["/", "?"], ["Shift", "Shift"]],
4554       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4555     ], 'lang': ["ro"] };
4556 
4557   this.VKI_layout['\u0420\u0443\u0441\u0441\u043a\u0438\u0439'] = {
4558     'name': "Russian", 'keys': [
4559       [["\u0451", "\u0401"], ["1", "!"], ["2", '"'], ["3", "\u2116"], ["4", ";"], ["5", "%"], ["6", ":"], ["7", "?"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
4560       [["Tab", "Tab"], ["\u0439", "\u0419"], ["\u0446", "\u0426"], ["\u0443", "\u0423"], ["\u043A", "\u041A"], ["\u0435", "\u0415"], ["\u043D", "\u041D"], ["\u0433", "\u0413"], ["\u0448", "\u0428"], ["\u0449", "\u0429"], ["\u0437", "\u0417"], ["\u0445", "\u0425"], ["\u044A", "\u042A"], ["\\", "/"]],
4561       [["Caps", "Caps"], ["\u0444", "\u0424"], ["\u044B", "\u042B"], ["\u0432", "\u0412"], ["\u0430", "\u0410"], ["\u043F", "\u041F"], ["\u0440", "\u0420"], ["\u043E", "\u041E"], ["\u043B", "\u041B"], ["\u0434", "\u0414"], ["\u0436", "\u0416"], ["\u044D", "\u042D"], ["Enter", "Enter"]],
4562       [["Shift", "Shift"], ["/", "|"], ["\u044F", "\u042F"], ["\u0447", "\u0427"], ["\u0441", "\u0421"], ["\u043C", "\u041C"], ["\u0438", "\u0418"], ["\u0442", "\u0422"], ["\u044C", "\u042C"], ["\u0431", "\u0411"], ["\u044E", "\u042E"], [".", ","], ["Shift", "Shift"]],
4563       [[" ", " "]]
4564     ], 'lang': ["ru"] };
4565 
4566   this.VKI_layout['Schweizerdeutsch'] = {
4567     'name': "Swiss German", 'keys': [
4568       [["\u00A7", "\u00B0"], ["1", "+", "\u00A6"], ["2", '"', "@"], ["3", "*", "#"], ["4", "\u00E7", "\u00B0"], ["5", "%", "\u00A7"], ["6", "&", "\u00AC"], ["7", "/", "|"], ["8", "(", "\u00A2"], ["9", ")"], ["0", "="], ["'", "?", "\u00B4"], ["^", "`", "~"], ["Bksp", "Bksp"]],
4569       [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20AC"], ["r", "R"], ["t", "T"], ["z", "Z"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00FC", "\u00E8", "["], ["\u00A8", "!", "]"], ["$", "\u00A3", "}"]],
4570       [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00F6", "\u00E9"], ["\u00E4", "\u00E0", "{"], ["Enter", "Enter"]],
4571       [["Shift", "Shift"], ["<", ">", "\\"], ["y", "Y"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
4572       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4573     ], 'lang': ["de-CH"] };
4574 
4575   this.VKI_layout['Shqip'] = {
4576     'name': "Albanian", 'keys': [
4577       [["\\", "|"], ["1", "!", "~"], ["2", '"', "\u02C7"], ["3", "#", "^"], ["4", "$", "\u02D8"], ["5", "%", "\u00B0"], ["6", "^", "\u02DB"], ["7", "&", "`"], ["8", "*", "\u02D9"], ["9", "(", "\u00B4"], ["0", ")", "\u02DD"], ["-", "_", "\u00A8"], ["=", "+", "\u00B8"], ["Bksp", "Bksp"]],
4578       [["Tab", "Tab"], ["q", "Q", "\\"], ["w", "W", "|"], ["e", "E"], ["r", "R"], ["t", "T"], ["z", "Z"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00E7", "\u00C7", "\u00F7"], ["[", "{", "\u00DF"], ["]", "}", "\u00A4"]],
4579       [["Caps", "Caps"], ["a", "A"], ["s", "S", "\u0111"], ["d", "D", "\u0110"], ["f", "F", "["], ["g", "G", "]"], ["h", "H"], ["j", "J"], ["k", "K", "\u0142"], ["l", "L", "\u0141"], ["\u00EB", "\u00CB", "$"], ["@", "'", "\u00D7"], ["Enter", "Enter"]],
4580       [["Shift", "Shift"], ["<", ">"], ["y", "Y"], ["x", "X"], ["c", "C"], ["v", "V", "@"], ["b", "B", "{"], ["n", "N", "}"], ["m", "M", "\u00A7"], [",", ";", "<"], [".", ":", ">"], ["/", "?"], ["Shift", "Shift"]],
4581       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4582     ], 'lang': ["sq"] };
4583 
4584   this.VKI_layout['Sloven\u010dina'] = {
4585     'name': "Slovak", 'keys': [
4586       [[";", "\u00b0"], ["+", "1", "~"], ["\u013E", "2", "\u02C7"], ["\u0161", "3", "^"], ["\u010D", "4", "\u02D8"], ["\u0165", "5", "\u00B0"], ["\u017E", "6", "\u02DB"], ["\u00FD", "7", "`"], ["\u00E1", "8", "\u02D9"], ["\u00ED", "9", "\u00B4"], ["\u00E9", "0", "\u02DD"], ["=", "%", "\u00A8"], ["\u00B4", "\u02c7", "\u00B8"], ["Bksp", "Bksp"]],
4587       [["Tab", "Tab"], ["q", "Q", "\\"], ["w", "W", "|"], ["e", "E", "\u20AC"], ["r", "R"], ["t", "T"], ["z", "Z"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P", "'"], ["\u00FA", "/", "\u00F7"], ["\u00E4", "(", "\u00D7"], ["\u0148", ")", "\u00A4"]],
4588       [["Caps", "Caps"], ["a", "A"], ["s", "S", "\u0111"], ["d", "D", "\u0110"], ["f", "F", "["], ["g", "G", "]"], ["h", "H"], ["j", "J"], ["k", "K", "\u0142"], ["l", "L", "\u0141"], ["\u00F4", '"', "$"], ["\u00A7", "!", "\u00DF"], ["Enter", "Enter"]],
4589       [["Shift", "Shift"], ["&", "*", "<"], ["y", "Y", ">"], ["x", "X", "#"], ["c", "C", "&"], ["v", "V", "@"], ["b", "B", "{"], ["n", "N", "}"], ["m", "M"], [",", "?", "<"], [".", ":", ">"], ["-", "_", "*", ], ["Shift", "Shift"]],
4590       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4591     ], 'lang': ["sk"] };
4592 
4593   this.VKI_layout['Sloven\u0161\u010dina'] = {
4594     'name': "Slovenian", 'keys': this.VKI_layout['Bosanski'].keys.slice(0), 'lang': ["sl"]
4595   };
4596 
4597   this.VKI_layout['\u0441\u0440\u043f\u0441\u043a\u0438'] = {
4598     'name': "Serbian Cyrillic", 'keys': [
4599       [["`", "~"], ["1", "!"], ["2", '"'], ["3", "#"], ["4", "$"], ["5", "%"], ["6", "&"], ["7", "/"], ["8", "("], ["9", ")"], ["0", "="], ["'", "?"], ["+", "*"], ["Bksp", "Bksp"]],
4600       [["Tab", "Tab"], ["\u0459", "\u0409"], ["\u045a", "\u040a"], ["\u0435", "\u0415", "\u20ac"], ["\u0440", "\u0420"], ["\u0442", "\u0422"], ["\u0437", "\u0417"], ["\u0443", "\u0423"], ["\u0438", "\u0418"], ["\u043e", "\u041e"], ["\u043f", "\u041f"], ["\u0448", "\u0428"], ["\u0452", "\u0402"], ["\u0436", "\u0416"]],
4601       [["Caps", "Caps"], ["\u0430", "\u0410"], ["\u0441", "\u0421"], ["\u0434", "\u0414"], ["\u0444", "\u0424"], ["\u0433", "\u0413"], ["\u0445", "\u0425"], ["\u0458", "\u0408"], ["\u043a", "\u041a"], ["\u043b", "\u041b"], ["\u0447", "\u0427"], ["\u045b", "\u040b"], ["Enter", "Enter"]],
4602       [["Shift", "Shift"], ["<", ">"], ["\u0455", "\u0405"], ["\u045f", "\u040f"], ["\u0446", "\u0426"], ["\u0432", "\u0412"], ["\u0431", "\u0411"], ["\u043d", "\u041d"], ["\u043c", "\u041c"], [",", ";", "<"], [".", ":", ">"], ["-", "_", "\u00a9"], ["Shift", "Shift"]],
4603       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4604     ], 'lang': ["sr-Cyrl"] };
4605 
4606   this.VKI_layout['Srpski'] = {
4607     'name': "Serbian Latin", 'keys': this.VKI_layout['Bosanski'].keys.slice(0), 'lang': ["sr"]
4608   };
4609 
4610   this.VKI_layout['Suomi'] = {
4611     'name': "Finnish", 'keys': [
4612       [["\u00a7", "\u00BD"], ["1", "!"], ["2", '"', "@"], ["3", "#", "\u00A3"], ["4", "\u00A4", "$"], ["5", "%", "\u20AC"], ["6", "&"], ["7", "/", "{"], ["8", "(", "["], ["9", ")", "]"], ["0", "=", "}"], ["+", "?", "\\"], ["\u00B4", "`"], ["Bksp", "Bksp"]],
4613       [["Tab", "Tab"], ["q", "Q", "\u00E2", "\u00C2"], ["w", "W"], ["e", "E", "\u20AC"], ["r", "R"], ["t", "T", "\u0167", "\u0166"], ["y", "Y"], ["u", "U"], ["i", "I", "\u00ef", "\u00CF"], ["o", "O", "\u00f5", "\u00D5"], ["p", "P"], ["\u00E5", "\u00C5"], ["\u00A8", "^", "~"], ["'", "*"]],
4614       [["Caps", "Caps"], ["a", "A", "\u00E1", "\u00C1"], ["s", "S", "\u0161", "\u0160"], ["d", "D", "\u0111", "\u0110"], ["f", "F", "\u01e5", "\u01E4"], ["g", "G", "\u01E7", "\u01E6"], ["h", "H", "\u021F", "\u021e"], ["j", "J"], ["k", "K", "\u01e9", "\u01E8"], ["l", "L"], ["\u00F6", "\u00D6", "\u00F8", "\u00D8"], ["\u00E4", "\u00C4", "\u00E6", "\u00C6"], ["Enter", "Enter"]],
4615       [["Shift", "Shift"], ["<", ">", "|"], ["z", "Z", "\u017E", "\u017D"], ["x", "X"], ["c", "C", "\u010d", "\u010C"], ["v", "V", "\u01EF", "\u01EE"], ["b", "B", "\u0292", "\u01B7"], ["n", "N", "\u014B", "\u014A"], ["m", "M", "\u00B5"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
4616       [["Alt", "Alt"], [" ", " ", " ", " "], ["AltGr", "AltGr"]]
4617     ], 'lang': ["fi"] };
4618 
4619   this.VKI_layout['Svenska'] = {
4620     'name': "Swedish", 'keys': [
4621       [["\u00a7", "\u00bd"], ["1", "!"], ["2", '"', "@"], ["3", "#", "\u00a3"], ["4", "\u00a4", "$"], ["5", "%", "\u20ac"], ["6", "&"], ["7", "/", "{"], ["8", "(", "["], ["9", ")", "]"], ["0", "=", "}"], ["+", "?", "\\"], ["\u00b4", "`"], ["Bksp", "Bksp"]],
4622       [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20ac"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00e5", "\u00c5"], ["\u00a8", "^", "~"], ["'", "*"]],
4623       [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00f6", "\u00d6"], ["\u00e4", "\u00c4"], ["Enter", "Enter"]],
4624       [["Shift", "Shift"], ["<", ">", "|"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M", "\u03bc", "\u039c"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
4625       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4626     ], 'lang': ["sv"] };
4627 
4628   this.VKI_layout['Swiss Fran\u00e7ais'] = {
4629     'name': "Swiss French", 'keys': [
4630       [["\u00A7", "\u00B0"], ["1", "+", "\u00A6"], ["2", '"', "@"], ["3", "*", "#"], ["4", "\u00E7", "\u00B0"], ["5", "%", "\u00A7"], ["6", "&", "\u00AC"], ["7", "/", "|"], ["8", "(", "\u00A2"], ["9", ")"], ["0", "="], ["'", "?", "\u00B4"], ["^", "`", "~"], ["Bksp", "Bksp"]],
4631       [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u20AC"], ["r", "R"], ["t", "T"], ["z", "Z"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["\u00E8", "\u00FC", "["], ["\u00A8", "!", "]"], ["$", "\u00A3", "}"]],
4632       [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u00E9", "\u00F6"], ["\u00E0", "\u00E4", "{"], ["Enter", "Enter"]],
4633       [["Shift", "Shift"], ["<", ">", "\\"], ["y", "Y"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", ";"], [".", ":"], ["-", "_"], ["Shift", "Shift"]],
4634       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4635     ], 'lang': ["fr-CH"] };
4636 
4637   this.VKI_layout['\u0723\u0718\u072a\u071d\u071d\u0710'] = {
4638     'name': "Syriac", 'keys': [
4639       [["\u070f", "\u032e", "\u0651", "\u0651"], ["1", "!", "\u0701", "\u0701"], ["2", "\u030a", "\u0702", "\u0702"], ["3", "\u0325", "\u0703", "\u0703"], ["4", "\u0749", "\u0704", "\u0704"], ["5", "\u2670", "\u0705", "\u0705"], ["6", "\u2671", "\u0708", "\u0708"], ["7", "\u070a", "\u0709", "\u0709"], ["8", "\u00bb", "\u070B", "\u070B"], ["9", ")", "\u070C", "\u070C"], ["0", "(", "\u070D", "\u070D"], ["-", "\u00ab", "\u250C", "\u250C"], ["=", "+", "\u2510", "\u2510"], ["Bksp", "Bksp"]],
4640       [["Tab", "Tab"], ["\u0714", "\u0730", "\u064E", "\u064E"], ["\u0728", "\u0733", "\u064B", "\u064B"], ["\u0716", "\u0736", "\u064F", "\u064F"], ["\u0729", "\u073A", "\u064C", "\u064C"], ["\u0726", "\u073D", "\u0653", "\u0653"], ["\u071c", "\u0740", "\u0654", "\u0654"], ["\u0725", "\u0741", "\u0747", "\u0747"], ["\u0717", "\u0308", "\u0743", "\u0743"], ["\u071e", "\u0304", "\u0745", "\u0745"], ["\u071a", "\u0307", "\u032D", "\u032D"], ["\u0713", "\u0303"], ["\u0715", "\u074A"], ["\u0706", ":"]],
4641       [["Caps", "Caps"], ["\u072b", "\u0731", "\u0650", "\u0650"], ["\u0723", "\u0734", "\u064d", "\u064d"], ["\u071d", "\u0737"], ["\u0712", "\u073b", "\u0621", "\u0621"], ["\u0720", "\u073e", "\u0655", "\u0655"], ["\u0710", "\u0711", "\u0670", "\u0670"], ["\u072c", "\u0640", "\u0748", "\u0748"], ["\u0722", "\u0324", "\u0744", "\u0744"], ["\u0721", "\u0331", "\u0746", "\u0746"], ["\u071f", "\u0323"], ["\u071b", "\u0330"], ["Enter", "Enter"]],
4642       [["Shift", "Shift"], ["]", "\u0732"], ["[", "\u0735", "\u0652", "\u0652"], ["\u0724", "\u0738"], ["\u072a", "\u073c", "\u200D"], ["\u0727", "\u073f", "\u200C"], ["\u0700", "\u0739", "\u200E"], [".", "\u0742", "\u200F"], ["\u0718", "\u060c"], ["\u0719", "\u061b"], ["\u0707", "\u061F"], ["Shift", "Shift"]],
4643       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4644     ], 'lang': ["syc"] };
4645 
4646   this.VKI_layout['\u0ba4\u0bae\u0bbf\u0bb4\u0bcd'] = {
4647     'name': "Tamil", 'keys': [
4648       [["\u0BCA", "\u0B92"], ["1", "", "\u0BE7"], ["2", "", "\u0BE8"], ["3", "", "\u0BE9"], ["4", "", "\u0BEA"], ["5", "", "\u0BEB"], ["6", "\u0BA4\u0BCD\u0BB0", "\u0BEC"], ["7", "\u0B95\u0BCD\u0BB7", "\u0BED"], ["8", "\u0BB7\u0BCD\u0BB0", "\u0BEE"], ["9", "", "\u0BEF"], ["0", "", "\u0BF0"], ["-", "\u0B83", "\u0BF1"], ["", "", "\u0BF2"], ["Bksp", "Bksp"]],
4649       [["Tab", "Tab"], ["\u0BCC", "\u0B94"], ["\u0BC8", "\u0B90"], ["\u0BBE", "\u0B86"], ["\u0BC0", "\u0B88"], ["\u0BC2", "\u0B8A"], ["\u0BAA", "\u0BAA"], ["\u0BB9", "\u0B99"], ["\u0B95", "\u0B95"], ["\u0BA4", "\u0BA4"], ["\u0B9C", "\u0B9A"], ["\u0B9F", "\u0B9F"], ["\u0B9E"]],
4650       [["Caps", "Caps"], ["\u0BCB", "\u0B93"], ["\u0BC7", "\u0B8F"], ["\u0BCD", "\u0B85"], ["\u0BBF", "\u0B87"], ["\u0BC1", "\u0B89"], ["\u0BAA", "\u0BAA"], ["\u0BB0", "\u0BB1"], ["\u0B95", "\u0B95"], ["\u0BA4", "\u0BA4"], ["\u0B9A", "\u0B9A"], ["\u0B9F", "\u0B9F"], ["Enter", "Enter"]],
4651       [["Shift", "Shift"], ["\u0BC6", "\u0B8E"], [""], ["\u0BAE", "\u0BA3"], ["\u0BA8", "\u0BA9"], ["\u0BB5", "\u0BB4"], ["\u0BB2", "\u0BB3"], ["\u0BB8", "\u0BB7"], [",", "\u0BB7"], [".", "\u0BB8\u0BCD\u0BB0\u0BC0"], ["\u0BAF", "\u0BAF"], ["Shift", "Shift"]],
4652       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4653     ], 'lang': ["ta"] };
4654 
4655   this.VKI_layout['\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41'] = {
4656     'name': "Telugu", 'keys': [
4657       [["\u0C4A", "\u0C12"], ["1", "", "\u0C67"], ["2", "", "\u0C68"], ["3", "\u0C4D\u0C30", "\u0C69"], ["4", "", "\u0C6A"], ["5", "\u0C1C\u0C4D\u0C1E", "\u0C6B"], ["6", "\u0C24\u0C4D\u0C30", "\u0C6C"], ["7", "\u0C15\u0C4D\u0C37", "\u0C6D"], ["8", "\u0C36\u0C4D\u0C30", "\u0C6E"], ["9", "(", "\u0C6F"], ["0", ")", "\u0C66"], ["-", "\u0C03"], ["\u0C43", "\u0C0B", "\u0C44"], ["Bksp", "Bksp"]],
4658       [["Tab", "Tab"], ["\u0C4C", "\u0C14"], ["\u0C48", "\u0C10", "\u0C56"], ["\u0C3E", "\u0C06"], ["\u0C40", "\u0C08", "", "\u0C61"], ["\u0C42", "\u0C0A"], ["\u0C2C"], ["\u0C39", "\u0C19"], ["\u0C17", "\u0C18"], ["\u0C26", "\u0C27"], ["\u0C1C", "\u0C1D"], ["\u0C21", "\u0C22"], ["", "\u0C1E"]],
4659       [["Caps", "Caps"], ["\u0C4B", "\u0C13"], ["\u0C47", "\u0C0F", "\u0C55"], ["\u0C4D", "\u0C05"], ["\u0C3F", "\u0C07", "", "\u0C0C"], ["\u0C41", "\u0C09"], ["\u0C2A", "\u0C2B"], ["\u0C30", "\u0C31"], ["\u0C15", "\u0C16"], ["\u0C24", "\u0C25"], ["\u0C1A", "\u0C1B"], ["\u0C1F", "\u0C25"], ["Enter", "Enter"]],
4660       [["Shift", "Shift"], ["\u0C46", "\u0C0E"], ["\u0C02", "\u0C01"], ["\u0C2E", "\u0C23"], ["\u0C28", "\u0C28"], ["\u0C35"], ["\u0C32", "\u0C33"], ["\u0C38", "\u0C36"], [",", "\u0C37"], ["."], ["\u0C2F"], ["Shift", "Shift"]],
4661       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4662     ], 'lang': ["te"] };
4663 
4664   this.VKI_layout['Ti\u1ebfng Vi\u1ec7t'] = {
4665     'name': "Vietnamese", 'keys': [
4666       [["`", "~", "`", "~"], ["\u0103", "\u0102", "1", "!"], ["\u00E2", "\u00C2", "2", "@"], ["\u00EA", "\u00CA", "3", "#"], ["\u00F4", "\u00D4", "4", "$"], ["\u0300", "\u0300", "5", "%"], ["\u0309", "\u0309", "6", "^"], ["\u0303", "\u0303", "7", "&"], ["\u0301", "\u0301", "8", "*"], ["\u0323", "\u0323", "9", "("], ["\u0111", "\u0110", "0", ")"], ["-", "_", "-", "_"], ["\u20AB", "+", "=", "+"], ["Bksp", "Bksp"]],
4667       [["Tab", "Tab"], ["q", "Q", "q", "Q"], ["w", "W", "w", "W"], ["e", "E", "e", "E"], ["r", "R", "r", "R"], ["t", "T", "t", "T"], ["y", "Y", "y", "Y"], ["u", "U", "u", "U"], ["i", "I", "i", "I"], ["o", "O", "o", "O"], ["p", "P", "p", "P"], ["\u01B0", "\u01AF", "[", "{"], ["\u01A1", "\u01A0", "]", "}"], ["\\", "|", "\\", "|"]],
4668       [["Caps", "Caps"], ["a", "A", "a", "A"], ["s", "S", "s", "S"], ["d", "D", "d", "D"], ["f", "F", "f", "F"], ["g", "G", "g", "G"], ["h", "H", "h", "H"], ["j", "J", "j", "J"], ["k", "K", "k", "K"], ["l", "L", "l", "L"], [";", ":", ";", ":"], ["'", '"', "'", '"'], ["Enter", "Enter"]],
4669       [["Shift", "Shift"], ["z", "Z", "z", "Z"], ["x", "X", "x", "X"], ["c", "C", "c", "C"], ["v", "V", "v", "V"], ["b", "B", "b", "B"], ["n", "N", "n", "N"], ["m", "M", "m", "M"], [",", "<", ",", "<"], [".", ">", ".", ">"], ["/", "?", "/", "?"], ["Shift", "Shift"]],
4670       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4671     ], 'lang': ["vi"] };
4672 
4673   this.VKI_layout['\u0e44\u0e17\u0e22 Kedmanee'] = {
4674     'name': "Thai Kedmanee", 'keys': [
4675       [["_", "%"], ["\u0E45", "+"], ["/", "\u0E51"], ["-", "\u0E52"], ["\u0E20", "\u0E53"], ["\u0E16", "\u0E54"], ["\u0E38", "\u0E39"], ["\u0E36", "\u0E3F"], ["\u0E04", "\u0E55"], ["\u0E15", "\u0E56"], ["\u0E08", "\u0E57"], ["\u0E02", "\u0E58"], ["\u0E0A", "\u0E59"], ["Bksp", "Bksp"]],
4676       [["Tab", "Tab"], ["\u0E46", "\u0E50"], ["\u0E44", '"'], ["\u0E33", "\u0E0E"], ["\u0E1E", "\u0E11"], ["\u0E30", "\u0E18"], ["\u0E31", "\u0E4D"], ["\u0E35", "\u0E4A"], ["\u0E23", "\u0E13"], ["\u0E19", "\u0E2F"], ["\u0E22", "\u0E0D"], ["\u0E1A", "\u0E10"], ["\u0E25", ","], ["\u0E03", "\u0E05"]],
4677       [["Caps", "Caps"], ["\u0E1F", "\u0E24"], ["\u0E2B", "\u0E06"], ["\u0E01", "\u0E0F"], ["\u0E14", "\u0E42"], ["\u0E40", "\u0E0C"], ["\u0E49", "\u0E47"], ["\u0E48", "\u0E4B"], ["\u0E32", "\u0E29"], ["\u0E2A", "\u0E28"], ["\u0E27", "\u0E0B"], ["\u0E07", "."], ["Enter", "Enter"]],
4678       [["Shift", "Shift"], ["\u0E1C", "("], ["\u0E1B", ")"], ["\u0E41", "\u0E09"], ["\u0E2D", "\u0E2E"], ["\u0E34", "\u0E3A"], ["\u0E37", "\u0E4C"], ["\u0E17", "?"], ["\u0E21", "\u0E12"], ["\u0E43", "\u0E2C"], ["\u0E1D", "\u0E26"], ["Shift", "Shift"]],
4679       [[" ", " "]]
4680     ], 'lang': ["th"] };
4681 
4682   this.VKI_layout['\u0e44\u0e17\u0e22 Pattachote'] = {
4683     'name': "Thai Pattachote", 'keys': [
4684       [["_", "\u0E3F"], ["=", "+"], ["\u0E52", '"'], ["\u0E53", "/"], ["\u0E54", ","], ["\u0E55", "?"], ["\u0E39", "\u0E38"], ["\u0E57", "_"], ["\u0E58", "."], ["\u0E59", "("], ["\u0E50", ")"], ["\u0E51", "-"], ["\u0E56", "%"], ["Bksp", "Bksp"]],
4685       [["Tab", "Tab"], ["\u0E47", "\u0E4A"], ["\u0E15", "\u0E24"], ["\u0E22", "\u0E46"], ["\u0E2D", "\u0E0D"], ["\u0E23", "\u0E29"], ["\u0E48", "\u0E36"], ["\u0E14", "\u0E1D"], ["\u0E21", "\u0E0B"], ["\u0E27", "\u0E16"], ["\u0E41", "\u0E12"], ["\u0E43", "\u0E2F"], ["\u0E0C", "\u0E26"], ["\uF8C7", "\u0E4D"]],
4686       [["Caps", "Caps"], ["\u0E49", "\u0E4B"], ["\u0E17", "\u0E18"], ["\u0E07", "\u0E33"], ["\u0E01", "\u0E13"], ["\u0E31", "\u0E4C"], ["\u0E35", "\u0E37"], ["\u0E32", "\u0E1C"], ["\u0E19", "\u0E0A"], ["\u0E40", "\u0E42"], ["\u0E44", "\u0E06"], ["\u0E02", "\u0E11"], ["Enter", "Enter"]],
4687       [["Shift", "Shift"], ["\u0E1A", "\u0E0E"], ["\u0E1B", "\u0E0F"], ["\u0E25", "\u0E10"], ["\u0E2B", "\u0E20"], ["\u0E34", "\u0E31"], ["\u0E04", "\u0E28"], ["\u0E2A", "\u0E2E"], ["\u0E30", "\u0E1F"], ["\u0E08", "\u0E09"], ["\u0E1E", "\u0E2C"], ["Shift", "Shift"]],
4688       [[" ", " "]]
4689     ]};
4690 
4691   this.VKI_layout['\u0422\u0430\u0442\u0430\u0440\u0447\u0430'] = {
4692     'name': "Tatar", 'keys': [
4693       [["\u04BB", "\u04BA", "\u0451", "\u0401"], ["1", "!"], ["2", '"', "@"], ["3", "\u2116", "#"], ["4", ";", "$"], ["5", "%"], ["6", ":"], ["7", "?", "["], ["8", "*", "]"], ["9", "(", "{"], ["0", ")", "}"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
4694       [["Tab", "Tab"], ["\u0439", "\u0419"], ["\u04E9", "\u04E8", "\u0446", "\u0426"], ["\u0443", "\u0423"], ["\u043A", "\u041A"], ["\u0435", "\u0415"], ["\u043D", "\u041D"], ["\u0433", "\u0413"], ["\u0448", "\u0428"], ["\u04D9", "\u04D8", "\u0449", "\u0429"], ["\u0437", "\u0417"], ["\u0445", "\u0425"], ["\u04AF", "\u04AE", "\u044A", "\u042A"], ["\\", "/"]],
4695       [["Caps", "Caps"], ["\u0444", "\u0424"], ["\u044B", "\u042B"], ["\u0432", "\u0412"], ["\u0430", "\u0410"], ["\u043F", "\u041F"], ["\u0440", "\u0420"], ["\u043E", "\u041E"], ["\u043B", "\u041B"], ["\u0434", "\u0414"], ["\u04A3", "\u04A2", "\u0436", "\u0416"], ["\u044D", "\u042D", "'"], ["Enter", "Enter"]],
4696       [["Shift", "Shift"], ["\u0491", "\u0490"], ["\u044F", "\u042F"], ["\u0447", "\u0427"], ["\u0441", "\u0421"], ["\u043C", "\u041C"], ["\u0438", "\u0418"], ["\u0442", "\u0422"], ["\u0497", "\u0496", "\u044C", "\u042C"], ["\u0431", "\u0411", "<"], ["\u044E", "\u042E", ">"], [".", ","], ["Shift", "Shift"]],
4697       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4698     ], 'lang': ["tt"] };
4699 
4700   this.VKI_layout['T\u00fcrk\u00e7e F'] = {
4701     'name': "Turkish F", 'keys': [
4702       [['+', "*", "\u00ac"], ["1", "!", "\u00b9", "\u00a1"], ["2", '"', "\u00b2"], ["3", "^", "#", "\u00b3"], ["4", "$", "\u00bc", "\u00a4"], ["5", "%", "\u00bd"], ["6", "&", "\u00be"], ["7", "'", "{"], ["8", "(", '['], ["9", ")", ']'], ["0", "=", "}"], ["/", "?", "\\", "\u00bf"], ["-", "_", "|"], ["Bksp", "Bksp"]],
4703       [["Tab", "Tab"], ["f", "F", "@"], ["g", "G"], ["\u011f", "\u011e"], ["\u0131", "I", "\u00b6", "\u00ae"], ["o", "O"], ["d", "D", "\u00a5"], ["r", "R"], ["n", "N"], ["h", "H", "\u00f8", "\u00d8"], ["p", "P", "\u00a3"], ["q", "Q", "\u00a8"], ["w", "W", "~"], ["x", "X", "`"]],
4704       [["Caps", "Caps"], ["u", "U", "\u00e6", "\u00c6"], ["i", "\u0130", "\u00df", "\u00a7"], ["e", "E", "\u20ac"], ["a", "A", " ", "\u00aa"], ["\u00fc", "\u00dc"], ["t", "T"], ["k", "K"], ["m", "M"], ["l", "L"], ["y", "Y", "\u00b4"], ["\u015f", "\u015e"], ["Enter", "Enter"]],
4705       [["Shift", "Shift"], ["<", ">", "|", "\u00a6"], ["j", "J", "\u00ab", "<"], ["\u00f6", "\u00d6", "\u00bb", ">"], ["v", "V", "\u00a2", "\u00a9"], ["c", "C"], ["\u00e7", "\u00c7"], ["z", "Z"], ["s", "S", "\u00b5", "\u00ba"], ["b", "B", "\u00d7"], [".", ":", "\u00f7"], [",", ";", "-"], ["Shift", "Shift"]],
4706       [[" ", " ", " ", " "],  ["AltGr", "AltGr"]]
4707     ]};
4708 
4709   this.VKI_layout['T\u00fcrk\u00e7e Q'] = {
4710     'name': "Turkish Q", 'keys': [
4711       [['"', "\u00e9", "<"], ["1", "!", ">"], ["2", "'", "\u00a3"], ["3", "^", "#"], ["4", "+", "$"], ["5", "%", "\u00bd"], ["6", "&"], ["7", "/", "{"], ["8", "(", '['], ["9", ")", ']'], ["0", "=", "}"], ["*", "?", "\\"], ["-", "_", "|"], ["Bksp", "Bksp"]],
4712       [["Tab", "Tab"], ["q", "Q", "@"], ["w", "W"], ["e", "E", "\u20ac"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["\u0131", "I", "i", "\u0130"], ["o", "O"], ["p", "P"], ["\u011f", "\u011e", "\u00a8"], ["\u00fc", "\u00dc", "~"], [",", ";", "`"]],
4713       [["Caps", "Caps"], ["a", "A", "\u00e6", "\u00c6"], ["s", "S", "\u00df"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], ["\u015f", "\u015e", "\u00b4"], ["i", "\u0130"], ["Enter", "Enter"]],
4714       [["Shift", "Shift"], ["<", ">", "|"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], ["\u00f6", "\u00d6"], ["\u00e7", "\u00c7"], [".", ":"], ["Shift", "Shift"]],
4715       [[" ", " ", " ", " "],  ["AltGr", "AltGr"]]
4716     ], 'lang': ["tr"] };
4717 
4718   this.VKI_layout['\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430'] = {
4719     'name': "Ukrainian", 'keys': [
4720       [["\u00b4", "~"], ["1", "!"], ["2", '"'], ["3", "\u2116"], ["4", ";"], ["5", "%"], ["6", ":"], ["7", "?"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
4721       [["Tab", "Tab"], ["\u0439", "\u0419"], ["\u0446", "\u0426"], ["\u0443", "\u0423"], ["\u043A", "\u041A"], ["\u0435", "\u0415"], ["\u043D", "\u041D"], ["\u0433", "\u0413"], ["\u0448", "\u0428"], ["\u0449", "\u0429"], ["\u0437", "\u0417"], ["\u0445", "\u0425"], ["\u0457", "\u0407"], ["\u0491", "\u0490"]],
4722       [["Caps", "Caps"], ["\u0444", "\u0424"], ["\u0456", "\u0406"], ["\u0432", "\u0412"], ["\u0430", "\u0410"], ["\u043F", "\u041F"], ["\u0440", "\u0420"], ["\u043E", "\u041E"], ["\u043B", "\u041B"], ["\u0434", "\u0414"], ["\u0436", "\u0416"], ["\u0454", "\u0404"], ["Enter", "Enter"]],
4723       [["Shift", "Shift"], ["\u044F", "\u042F"], ["\u0447", "\u0427"], ["\u0441", "\u0421"], ["\u043C", "\u041C"], ["\u0438", "\u0418"], ["\u0442", "\u0422"], ["\u044C", "\u042C"], ["\u0431", "\u0411"], ["\u044E", "\u042E"], [".", ","], ["Shift", "Shift"]],
4724       [[" ", " "]]
4725     ], 'lang': ["uk"] };
4726 
4727   this.VKI_layout['United Kingdom'] = {
4728     'name': "United Kingdom", 'keys': [
4729       [["`", "\u00ac", "\u00a6"], ["1", "!"], ["2", '"'], ["3", "\u00a3"], ["4", "$", "\u20ac"], ["5", "%"], ["6", "^"], ["7", "&"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
4730       [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E", "\u00e9", "\u00c9"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U", "\u00fa", "\u00da"], ["i", "I", "\u00ed", "\u00cd"], ["o", "O", "\u00f3", "\u00d3"], ["p", "P"], ["[", "{"], ["]", "}"], ["#", "~"]],
4731       [["Caps", "Caps"], ["a", "A", "\u00e1", "\u00c1"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], [";", ":"], ["'", "@"], ["Enter", "Enter"]],
4732       [["Shift", "Shift"], ["\\", "|"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", "<"], [".", ">"], ["/", "?"], ["Shift", "Shift"]],
4733       [[" ", " ", " ", " "], ["AltGr", "AltGr"]]
4734     ], 'lang': ["en-gb"] };
4735 
4736   this.VKI_layout['\u0627\u0631\u062f\u0648'] = {
4737     'name': "Urdu", 'keys': [
4738       [["`", "~"], ["1", "!"], ["2", "@"], ["3", "#"], ["4", "$"], ["5", "\u066A"], ["6", "^"], ["7", "\u06D6"], ["8", "\u066D"], ["9", ")"], ["0", "("], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
4739       [["Tab", "Tab"], ["\u0637", "\u0638"], ["\u0635", "\u0636"], ["\u06be", "\u0630"], ["\u062f", "\u0688"], ["\u0679", "\u062B"], ["\u067e", "\u0651"], ["\u062a", "\u06C3"], ["\u0628", "\u0640"], ["\u062c", "\u0686"], ["\u062d", "\u062E"], ["]", "}"], ["[", "{"], ["\\", "|"]],
4740       [["Caps", "Caps"], ["\u0645", "\u0698"], ["\u0648", "\u0632"], ["\u0631", "\u0691"], ["\u0646", "\u06BA"], ["\u0644", "\u06C2"], ["\u06c1", "\u0621"], ["\u0627", "\u0622"], ["\u06A9", "\u06AF"], ["\u06CC", "\u064A"], ["\u061b", ":"], ["'", '"'], ["Enter", "Enter"]],
4741       [["Shift", "Shift"], ["\u0642", "\u200D"], ["\u0641", "\u200C"], ["\u06D2", "\u06D3"], ["\u0633", "\u200E"], ["\u0634", "\u0624"], ["\u063a", "\u0626"], ["\u0639", "\u200F"], ["\u060C", ">"], ["\u06D4", "<"], ["/", "\u061F"], ["Shift", "Shift"]],
4742       [[" ", " "]]
4743     ], 'lang': ["ur"] };
4744 
4745   this.VKI_layout['\u0627\u0631\u062f\u0648 Phonetic'] = {
4746     'name': "Urdu Phonetic", 'keys': [
4747       [["\u064D", "\u064B", "~"], ["\u06F1", "1", "!"], ["\u06F2", "2", "@"], ["\u06F3", "3", "#"], ["\u06F4", "4", "$"], ["\u06F5", "5", "\u066A"], ["\u06F6", "6", "^"], ["\u06F7", "7", "&"], ["\u06F8", "8", "*"], ["\u06F9", "9", "("], ["\u06F0", "0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
4748       [["Tab", "Tab"], ["\u0642", "\u0652"], ["\u0648", "\u0651", "\u0602"], ["\u0639", "\u0670", "\u0656"], ["\u0631", "\u0691", "\u0613"], ["\u062A", "\u0679", "\u0614"], ["\u06D2", "\u064E", "\u0601"], ["\u0621", "\u0626", "\u0654"], ["\u06CC", "\u0650", "\u0611"], ["\u06C1", "\u06C3"], ["\u067E", "\u064F", "\u0657"], ["[", "{"], ["]", "}"], ["\\", "|"]],
4749       [["Caps", "Caps"], ["\u0627", "\u0622", "\uFDF2"], ["\u0633", "\u0635", "\u0610"], ["\u062F", "\u0688", "\uFDFA"], ["\u0641"], ["\u06AF", "\u063A"], ["\u062D", "\u06BE", "\u0612"], ["\u062C", "\u0636", "\uFDFB"], ["\u06A9", "\u062E"], ["\u0644"], ["\u061B", ":"], ["'", '"'], ["Enter", "Enter"]],
4750       [["Shift", "Shift"], ["\u0632", "\u0630", "\u060F"], ["\u0634", "\u0698", "\u060E"], ["\u0686", "\u062B", "\u0603"], ["\u0637", "\u0638"], ["\u0628", "", "\uFDFD"], ["\u0646", "\u06BA", "\u0600"], ["\u0645", "\u0658"], ["\u060C", "", "<"], ["\u06D4", "\u066B", ">"], ["/", "\u061F"], ["Shift", "Shift"]],
4751       [[" ", " ", " ", " "], ["Alt", "Alt"]]
4752     ]};
4753 
4754   this.VKI_layout['US Standard'] = {
4755     'name': "US Standard", 'keys': [
4756       [["`", "~"], ["1", "!"], ["2", "@"], ["3", "#"], ["4", "$"], ["5", "%"], ["6", "^"], ["7", "&"], ["8", "*"], ["9", "("], ["0", ")"], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
4757       [["Tab", "Tab"], ["q", "Q"], ["w", "W"], ["e", "E"], ["r", "R"], ["t", "T"], ["y", "Y"], ["u", "U"], ["i", "I"], ["o", "O"], ["p", "P"], ["[", "{"], ["]", "}"], ["\\", "|"]],
4758       [["Caps", "Caps"], ["a", "A"], ["s", "S"], ["d", "D"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L"], [";", ":"], ["'", '"'], ["Enter", "Enter"]],
4759       [["Shift", "Shift"], ["z", "Z"], ["x", "X"], ["c", "C"], ["v", "V"], ["b", "B"], ["n", "N"], ["m", "M"], [",", "<"], [".", ">"], ["/", "?"], ["Shift", "Shift"]],
4760       [[" ", " "]]
4761     ], 'lang': ["en-us"] };
4762 
4763    this.VKI_layout['US International'] = {
4764     'name': "US International", 'keys': [
4765       [["`", "~"], ["1", "!", "\u00a1", "\u00b9"], ["2", "@", "\u00b2"], ["3", "#", "\u00b3"], ["4", "$", "\u00a4", "\u00a3"], ["5", "%", "\u20ac"], ["6", "^", "\u00bc"], ["7", "&", "\u00bd"], ["8", "*", "\u00be"], ["9", "(", "\u2018"], ["0", ")", "\u2019"], ["-", "_", "\u00a5"], ["=", "+", "\u00d7", "\u00f7"], ["Bksp", "Bksp"]],
4766       [["Tab", "Tab"], ["q", "Q", "\u00e4", "\u00c4"], ["w", "W", "\u00e5", "\u00c5"], ["e", "E", "\u00e9", "\u00c9"], ["r", "R", "\u00ae"], ["t", "T", "\u00fe", "\u00de"], ["y", "Y", "\u00fc", "\u00dc"], ["u", "U", "\u00fa", "\u00da"], ["i", "I", "\u00ed", "\u00cd"], ["o", "O", "\u00f3", "\u00d3"], ["p", "P", "\u00f6", "\u00d6"], ["[", "{", "\u00ab"], ["]", "}", "\u00bb"], ["\\", "|", "\u00ac", "\u00a6"]],
4767       [["Caps", "Caps"], ["a", "A", "\u00e1", "\u00c1"], ["s", "S", "\u00df", "\u00a7"], ["d", "D", "\u00f0", "\u00d0"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L", "\u00f8", "\u00d8"], [";", ":", "\u00b6", "\u00b0"], ["'", '"', "\u00b4", "\u00a8"], ["Enter", "Enter"]],
4768       [["Shift", "Shift"], ["z", "Z", "\u00e6", "\u00c6"], ["x", "X"], ["c", "C", "\u00a9", "\u00a2"], ["v", "V"], ["b", "B"], ["n", "N", "\u00f1", "\u00d1"], ["m", "M", "\u00b5"], [",", "<", "\u00e7", "\u00c7"], [".", ">"], ["/", "?", "\u00bf"], ["Shift", "Shift"]],
4769       [[" ", " ", " ", " "], ["Alt", "Alt"]]
4770     ], 'lang': ["en"] };
4771 
4772   this.VKI_layout['\u040e\u0437\u0431\u0435\u043a\u0447\u0430'] = {
4773     'name': "Uzbek Cyrillic", 'keys': [
4774       [["\u0451", "\u0401"], ["1", "!"], ["2", '"'], ["3", "\u2116"], ["4", ";"], ["5", "%"], ["6", ":"], ["7", "?"], ["8", "*"], ["9", "("], ["0", ")"], ["\u0493", "\u0492"], ["\u04B3", "\u04B2"], ["Bksp", "Bksp"]],
4775       [["Tab", "Tab"], ["\u0439", "\u0419"], ["\u0446", "\u0426"], ["\u0443", "\u0423"], ["\u043A", "\u041A"], ["\u0435", "\u0415"], ["\u043D", "\u041D"], ["\u0433", "\u0413"], ["\u0448", "\u0428"], ["\u045E", "\u040E"], ["\u0437", "\u0417"], ["\u0445", "\u0425"], ["\u044A", "\u042A"], ["\\", "/"]],
4776       [["Caps", "Caps"], ["\u0444", "\u0424"], ["\u049B", "\u049A"], ["\u0432", "\u0412"], ["\u0430", "\u0410"], ["\u043F", "\u041F"], ["\u0440", "\u0420"], ["\u043E", "\u041E"], ["\u043B", "\u041B"], ["\u0434", "\u0414"], ["\u0436", "\u0416"], ["\u044D", "\u042D"], ["Enter", "Enter"]],
4777       [["Shift", "Shift"], ["\u044F", "\u042F"], ["\u0447", "\u0427"], ["\u0441", "\u0421"], ["\u043C", "\u041C"], ["\u0438", "\u0418"], ["\u0442", "\u0422"], ["\u044C", "\u042C"], ["\u0431", "\u0411"], ["\u044E", "\u042E"], [".", ","], ["Shift", "Shift"]],
4778       [[" ", " "]]
4779     ], 'lang': ["uz"] };
4780 
4781   this.VKI_layout['\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9'] = { // from http://www.yv.org/uyip/hebyidkbd.txt http://uyip.org/keyboards.html
4782     'name': "Yiddish", 'keys': [
4783       [[";", "~", "\u05B0"], ["1", "!", "\u05B1"], ["2", "@", "\u05B2"], ["3", "#", "\u05B3"], ["4", "$", "\u05B4"], ["5", "%", "\u05B5"], ["6", "^", "\u05B6"], ["7", "*", "\u05B7"], ["8", "&", "\u05B8"], ["9", "(", "\u05C2"], ["0", ")", "\u05C1"], ["-", "_", "\u05B9"], ["=", "+", "\u05BC"], ["Bksp", "Bksp"]],
4784       [["Tab", "Tab"], ["/", "\u201F", "\u201F"], ["'", "\u201E", "\u201E"], ["\u05E7", "`", "`"], ["\u05E8", "\uFB2F", "\uFB2F"], ["\u05D0", "\uFB2E", "\uFB2E"], ["\u05D8", "\u05F0", "\u05F0"], ["\u05D5", "\uFB35", "\uFB35"], ["\u05DF", "\uFB4B", "\uFB4B"], ["\u05DD", "\uFB4E", "\uFB4E"], ["\u05E4", "\uFB44", "\uFB44"], ["[", "{", "\u05BD"], ["]", "}", "\u05BF"], ["\\", "|", "\u05BB"]],
4785       [["Caps", "Caps"], ["\u05E9", "\uFB2A", "\uFB2A"], ["\u05D3", "\uFB2B", "\uFB2B"], ["\u05D2"], ["\u05DB", "\uFB3B", "\uFB3B"], ["\u05E2", "\u05F1", "\u05F1"], ["\u05D9", "\uFB1D", "\uFB1D"], ["\u05D7", "\uFF1F", "\uFF1F"], ["\u05DC", "\u05F2", "\u05F2"], ["\u05DA"], ["\u05E3", ":", "\u05C3"], [",", '"', "\u05C0"], ["Enter", "Enter"]],
4786       [["Shift", "Shift"], ["\u05D6", "\u2260", "\u2260"], ["\u05E1", "\uFB4C", "\uFB4C"], ["\u05D1", "\uFB31", "\uFB31"], ["\u05D4", "\u05BE", "\u05BE"], ["\u05E0", "\u2013", "\u2013"], ["\u05DE", "\u2014", "\u2014"], ["\u05E6", "\uFB4A", "\uFB4A"], ["\u05EA", "<", "\u05F3"], ["\u05E5", ">", "\u05F4"], [".", "?", "\u20AA"], ["Shift", "Shift"]],
4787       [[" ", " "], ["Alt", "Alt"]]
4788     ], 'lang': ["yi"] };
4789 
4790   this.VKI_layout['\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 \u05dc\u05e2\u05d1\u05d8'] = { // from http://jidysz.net/ 
4791     'name': "Yiddish (Yidish Lebt)", 'keys': [
4792       [[";", "~"], ["1", "!", "\u05B2", "\u05B2"], ["2", "@", "\u05B3", "\u05B3"], ["3", "#", "\u05B1", "\u05B1"], ["4", "$", "\u05B4", "\u05B4"], ["5", "%", "\u05B5", "\u05B5"], ["6", "^", "\u05B7", "\u05B7"], ["7", "&", "\u05B8", "\u05B8"], ["8", "*", "\u05BB", "\u05BB"], ["9", ")", "\u05B6", "\u05B6"], ["0", "(", "\u05B0", "\u05B0"], ["-", "_", "\u05BF", "\u05BF"], ["=", "+", "\u05B9", "\u05B9"], ["Bksp", "Bksp"]],
4793       [["Tab", "Tab"], ["/", "", "\u05F4", "\u05F4"], ["'", "", "\u05F3", "\u05F3"], ["\u05E7", "", "\u20AC"], ["\u05E8"], ["\u05D0", "", "\u05D0\u05B7", "\uFB2E"], ["\u05D8", "", "\u05D0\u05B8", "\uFB2F"], ["\u05D5", "\u05D5\u05B9", "\u05D5\u05BC", "\uFB35"], ["\u05DF", "", "\u05D5\u05D5", "\u05F0"], ["\u05DD", "", "\u05BC"], ["\u05E4", "", "\u05E4\u05BC", "\uFB44"], ["]", "}", "\u201E", "\u201D"], ["[", "{", "\u201A", "\u2019"], ["\\", "|", "\u05BE", "\u05BE"]],
4794       [["Caps", "Caps"], ["\u05E9", "\u05E9\u05C1", "\u05E9\u05C2", "\uFB2B"], ["\u05D3", "", "\u20AA"], ["\u05D2", "\u201E"], ["\u05DB", "", "\u05DB\u05BC", "\uFB3B"], ["\u05E2", "", "", "\uFB20"], ["\u05D9", "", "\u05D9\u05B4", "\uFB1D"], ["\u05D7", "", "\u05F2\u05B7", "\uFB1F"], ["\u05DC", "\u05DC\u05B9", "\u05D5\u05D9", "\u05F1"], ["\u05DA", "", "", "\u05F2"], ["\u05E3", ":", "\u05E4\u05BF", "\uFB4E"], [",", '"', ";", "\u05B2"], ["Enter", "Enter"]],
4795       [["Shift", "Shift"], ["\u05D6", "", "\u2013", "\u2013"], ["\u05E1", "", "\u2014", "\u2014"], ["\u05D1", "\u05DC\u05B9", "\u05D1\u05BF", "\uFB4C"], ["\u05D4", "", "\u201D", "\u201C"], ["\u05E0", "", "\u059C", "\u059E"], ["\u05DE", "", "\u2019", "\u2018"], ["\u05E6", "", "\u05E9\u05C1", "\uFB2A"], ["\u05EA", ">", "\u05EA\u05BC", "\uFB4A"], ["\u05E5", "<"], [".", "?", "\u2026"], ["Shift", "Shift"]],
4796       [[" ", " ", " ", " "], ["Alt", "Alt"]]
4797     ], 'lang': ["yi"] };
4798 
4799   this.VKI_layout['\u4e2d\u6587\u6ce8\u97f3\u7b26\u53f7'] = {
4800     'name': "Chinese Bopomofo IME", 'keys': [
4801       [["\u20AC", "~"], ["\u3105", "!"], ["\u3109", "@"], ["\u02C7", "#"], ["\u02CB", "$"], ["\u3113", "%"], ["\u02CA", "^"], ["\u02D9", "&"], ["\u311A", "*"], ["\u311E", ")"], ["\u3122", "("], ["\u3126", "_"], ["=", "+"], ["Bksp", "Bksp"]],
4802       [["Tab", "Tab"], ["\u3106", "q"], ["\u310A", "w"], ["\u310D", "e"], ["\u3110", "r"], ["\u3114", "t"], ["\u3117", "y"], ["\u3127", "u"], ["\u311B", "i"], ["\u311F", "o"], ["\u3123", "p"], ["[", "{"], ["]", "}"], ["\\", "|"]],
4803       [["Caps", "Caps"], ["\u3107", "a"], ["\u310B", "s"], ["\u310E", "d"], ["\u3111", "f"], ["\u3115", "g"], ["\u3118", "h"], ["\u3128", "j"], ["\u311C", "k"], ["\u3120", "l"], ["\u3124", ":"], ["'", '"'], ["Enter", "Enter"]],
4804       [["Shift", "Shift"], ["\u3108", "z"], ["\u310C", "x"], ["\u310F", "c"], ["\u3112", "v"], ["\u3116", "b"], ["\u3119", "n"], ["\u3129", "m"], ["\u311D", "<"], ["\u3121", ">"], ["\u3125", "?"], ["Shift", "Shift"]],
4805       [[" ", " "]]
4806     ], 'lang': ["zh-Bopo"] };
4807 
4808   this.VKI_layout['\u4e2d\u6587\u4ed3\u9889\u8f93\u5165\u6cd5'] = {
4809     'name': "Chinese Cangjie IME", 'keys': [
4810       [["\u20AC", "~"], ["1", "!"], ["2", "@"], ["3", "#"], ["4", "$"], ["5", "%"], ["6", "^"], ["7", "&"], ["8", "*"], ["9", ")"], ["0", "("], ["-", "_"], ["=", "+"], ["Bksp", "Bksp"]],
4811       [["Tab", "Tab"], ["\u624B", "q"], ["\u7530", "w"], ["\u6C34", "e"], ["\u53E3", "r"], ["\u5EFF", "t"], ["\u535C", "y"], ["\u5C71", "u"], ["\u6208", "i"], ["\u4EBA", "o"], ["\u5FC3", "p"], ["[", "{"], ["]", "}"], ["\\", "|"]],
4812       [["Caps", "Caps"], ["\u65E5", "a"], ["\u5C38", "s"], ["\u6728", "d"], ["\u706B", "f"], ["\u571F", "g"], ["\u7AF9", "h"], ["\u5341", "j"], ["\u5927", "k"], ["\u4E2D", "l"], [";", ":"], ["'", '"'], ["Enter", "Enter"]],
4813       [["Shift", "Shift"], ["\uFF3A", "z"], ["\u96E3", "x"], ["\u91D1", "c"], ["\u5973", "v"], ["\u6708", "b"], ["\u5F13", "n"], ["\u4E00", "m"], [",", "<"], [".", ">"], ["/", "?"], ["Shift", "Shift"]],
4814       [[" ", " "]]
4815     ], 'lang': ["zh"] };
4816 
4817 
4818   /* ***** Define Dead Keys ************************************** */
4819   this.VKI_deadkey = {};
4820 
4821   // - Lay out each dead key set as an object of property/value
4822   //   pairs.  The rows below are wrapped so uppercase letters are
4823   //   below their lowercase equivalents.
4824   //
4825   // - The property name is the letter pressed after the diacritic.
4826   //   The property value is the letter this key-combo will generate.
4827   //
4828   // - Note that if you have created a new keyboard layout and want
4829   //   it included in the distributed script, PLEASE TELL ME if you
4830   //   have added additional dead keys to the ones below.
4831 
4832   this.VKI_deadkey['"'] = this.VKI_deadkey['\u00a8'] = this.VKI_deadkey['\u309B'] = { // Umlaut / Diaeresis / Greek Dialytika / Hiragana/Katakana Voiced Sound Mark
4833     'a': "\u00e4", 'e': "\u00eb", 'i': "\u00ef", 'o': "\u00f6", 'u': "\u00fc", 'y': "\u00ff", '\u03b9': "\u03ca", '\u03c5': "\u03cb", '\u016B': "\u01D6", '\u00FA': "\u01D8", '\u01D4': "\u01DA", '\u00F9': "\u01DC",
4834     'A': "\u00c4", 'E': "\u00cb", 'I': "\u00cf", 'O': "\u00d6", 'U': "\u00dc", 'Y': "\u0178", '\u0399': "\u03aa", '\u03a5': "\u03ab", '\u016A': "\u01D5", '\u00DA': "\u01D7", '\u01D3': "\u01D9", '\u00D9': "\u01DB",
4835     '\u304b': "\u304c", '\u304d': "\u304e", '\u304f': "\u3050", '\u3051': "\u3052", '\u3053': "\u3054", '\u305f': "\u3060", '\u3061': "\u3062", '\u3064': "\u3065", '\u3066': "\u3067", '\u3068': "\u3069",
4836     '\u3055': "\u3056", '\u3057': "\u3058", '\u3059': "\u305a", '\u305b': "\u305c", '\u305d': "\u305e", '\u306f': "\u3070", '\u3072': "\u3073", '\u3075': "\u3076", '\u3078': "\u3079", '\u307b': "\u307c",
4837     '\u30ab': "\u30ac", '\u30ad': "\u30ae", '\u30af': "\u30b0", '\u30b1': "\u30b2", '\u30b3': "\u30b4", '\u30bf': "\u30c0", '\u30c1': "\u30c2", '\u30c4': "\u30c5", '\u30c6': "\u30c7", '\u30c8': "\u30c9",
4838     '\u30b5': "\u30b6", '\u30b7': "\u30b8", '\u30b9': "\u30ba", '\u30bb': "\u30bc", '\u30bd': "\u30be", '\u30cf': "\u30d0", '\u30d2': "\u30d3", '\u30d5': "\u30d6", '\u30d8': "\u30d9", '\u30db': "\u30dc"
4839   };
4840   this.VKI_deadkey['~'] = { // Tilde / Stroke
4841     'a': "\u00e3", 'l': "\u0142", 'n': "\u00f1", 'o': "\u00f5",
4842     'A': "\u00c3", 'L': "\u0141", 'N': "\u00d1", 'O': "\u00d5"
4843   };
4844   this.VKI_deadkey['^'] = { // Circumflex
4845     'a': "\u00e2", 'e': "\u00ea", 'i': "\u00ee", 'o': "\u00f4", 'u': "\u00fb", 'w': "\u0175", 'y': "\u0177",
4846     'A': "\u00c2", 'E': "\u00ca", 'I': "\u00ce", 'O': "\u00d4", 'U': "\u00db", 'W': "\u0174", 'Y': "\u0176"
4847   };
4848   this.VKI_deadkey['\u02c7'] = { // Baltic caron
4849     'c': "\u010D", 'd': "\u010f", 'e': "\u011b", 's': "\u0161", 'l': "\u013e", 'n': "\u0148", 'r': "\u0159", 't': "\u0165", 'u': "\u01d4", 'z': "\u017E", '\u00fc': "\u01da",
4850     'C': "\u010C", 'D': "\u010e", 'E': "\u011a", 'S': "\u0160", 'L': "\u013d", 'N': "\u0147", 'R': "\u0158", 'T': "\u0164", 'U': "\u01d3", 'Z': "\u017D", '\u00dc': "\u01d9"
4851   };
4852   this.VKI_deadkey['\u02d8'] = { // Romanian and Turkish breve
4853     'a': "\u0103", 'g': "\u011f",
4854     'A': "\u0102", 'G': "\u011e"
4855   };
4856   this.VKI_deadkey['-'] = this.VKI_deadkey['\u00af'] = { // Macron
4857     'a': "\u0101", 'e': "\u0113", 'i': "\u012b", 'o': "\u014d", 'u': "\u016B", 'y': "\u0233", '\u00fc': "\u01d6",
4858     'A': "\u0100", 'E': "\u0112", 'I': "\u012a", 'O': "\u014c", 'U': "\u016A", 'Y': "\u0232", '\u00dc': "\u01d5"
4859   };
4860   this.VKI_deadkey['`'] = { // Grave
4861     'a': "\u00e0", 'e': "\u00e8", 'i': "\u00ec", 'o': "\u00f2", 'u': "\u00f9", '\u00fc': "\u01dc",
4862     'A': "\u00c0", 'E': "\u00c8", 'I': "\u00cc", 'O': "\u00d2", 'U': "\u00d9", '\u00dc': "\u01db"
4863   };
4864   this.VKI_deadkey["'"] = this.VKI_deadkey['\u00b4'] = this.VKI_deadkey['\u0384'] = { // Acute / Greek Tonos
4865     'a': "\u00e1", 'e': "\u00e9", 'i': "\u00ed", 'o': "\u00f3", 'u': "\u00fa", 'y': "\u00fd", '\u03b1': "\u03ac", '\u03b5': "\u03ad", '\u03b7': "\u03ae", '\u03b9': "\u03af", '\u03bf': "\u03cc", '\u03c5': "\u03cd", '\u03c9': "\u03ce", '\u00fc': "\u01d8",
4866     'A': "\u00c1", 'E': "\u00c9", 'I': "\u00cd", 'O': "\u00d3", 'U': "\u00da", 'Y': "\u00dd", '\u0391': "\u0386", '\u0395': "\u0388", '\u0397': "\u0389", '\u0399': "\u038a", '\u039f': "\u038c", '\u03a5': "\u038e", '\u03a9': "\u038f", '\u00dc': "\u01d7"
4867   };
4868   this.VKI_deadkey['\u02dd'] = { // Hungarian Double Acute Accent
4869     'o': "\u0151", 'u': "\u0171",
4870     'O': "\u0150", 'U': "\u0170"
4871   };
4872   this.VKI_deadkey['\u0385'] = { // Greek Dialytika + Tonos
4873     '\u03b9': "\u0390", '\u03c5': "\u03b0"
4874   };
4875   this.VKI_deadkey['\u00b0'] = this.VKI_deadkey['\u00ba'] = { // Ring
4876     'a': "\u00e5", 'u': "\u016f",
4877     'A': "\u00c5", 'U': "\u016e"
4878   };
4879   this.VKI_deadkey['\u02DB'] = { // Ogonek
4880     'a': "\u0106", 'e': "\u0119", 'i': "\u012f", 'o': "\u01eb", 'u': "\u0173", 'y': "\u0177",
4881     'A': "\u0105", 'E': "\u0118", 'I': "\u012e", 'O': "\u01ea", 'U': "\u0172", 'Y': "\u0176"
4882   };
4883   this.VKI_deadkey['\u02D9'] = { // Dot-above
4884     'c': "\u010B", 'e': "\u0117", 'g': "\u0121", 'z': "\u017C",
4885     'C': "\u010A", 'E': "\u0116", 'G': "\u0120", 'Z': "\u017B"
4886   };
4887   this.VKI_deadkey['\u00B8'] = this.VKI_deadkey['\u201a'] = { // Cedilla
4888     'c': "\u00e7", 's': "\u015F",
4889     'C': "\u00c7", 'S': "\u015E"
4890   };
4891   this.VKI_deadkey[','] = { // Comma
4892     's': (this.VKI_isIElt8) ? "\u015F" : "\u0219", 't': (this.VKI_isIElt8) ? "\u0163" : "\u021B",
4893     'S': (this.VKI_isIElt8) ? "\u015E" : "\u0218", 'T': (this.VKI_isIElt8) ? "\u0162" : "\u021A"
4894   };
4895   this.VKI_deadkey['\u3002'] = { // Hiragana/Katakana Point
4896     '\u306f': "\u3071", '\u3072': "\u3074", '\u3075': "\u3077", '\u3078': "\u307a", '\u307b': "\u307d",
4897     '\u30cf': "\u30d1", '\u30d2': "\u30d4", '\u30d5': "\u30d7", '\u30d8': "\u30da", '\u30db': "\u30dd"
4898   };
4899 
4900 
4901   /* ***** Define Symbols **************************************** */
4902   this.VKI_symbol = {
4903     '\u00a0': "NB\nSP", '\u200b': "ZW\nSP", '\u200c': "ZW\nNJ", '\u200d': "ZW\nJ"
4904   };
4905 
4906 
4907   /* ***** Layout Number Pad ************************************* */
4908   this.VKI_numpad = [
4909     [["$"], ["\u00a3"], ["\u20ac"], ["\u00a5"]],
4910     [["7"], ["8"], ["9"], ["/"]],
4911     [["4"], ["5"], ["6"], ["*"]],
4912     [["1"], ["2"], ["3"], ["-"]],
4913     [["0"], ["."], ["="], ["+"]]
4914   ];
4915 
4916 
4917   /* ****************************************************************
4918    * Attach the keyboard to an element
4919    *
4920    */
4921   VKI_attach = function(elem) {
4922     if (elem.getAttribute("VKI_attached")) return false;
4923     if (self.VKI_imageURI) {
4924       var keybut = document.createElement('img');
4925           keybut.src = self.VKI_imageURI;
4926           keybut.alt = self.VKI_i18n['01'];
4927           keybut.className = "keyboardInputInitiator";
4928           keybut.title = self.VKI_i18n['01'];
4929           keybut.elem = elem;
4930           keybut.onclick = function(e) {
4931             e = e || event;
4932             if (e.stopPropagation) { e.stopPropagation(); } else e.cancelBubble = true;
4933             self.VKI_show(this.elem);
4934           };
4935       elem.parentNode.insertBefore(keybut, (elem.dir == "rtl") ? elem : elem.nextSibling);
4936     } else {
4937       elem.onfocus = function() {
4938         if (self.VKI_target != this) {
4939           if (self.VKI_target) self.VKI_close();
4940           self.VKI_show(this);
4941         }
4942       };
4943       elem.onclick = function() {
4944         if (!self.VKI_target) self.VKI_show(this);
4945       }
4946     }
4947     elem.setAttribute("VKI_attached", 'true');
4948     if (self.VKI_isIE) {
4949       elem.onclick = elem.onselect = elem.onkeyup = function(e) {
4950         if ((e || event).type != "keyup" || !this.readOnly)
4951           this.range = document.selection.createRange();
4952       };
4953     }
4954     VKI_addListener(elem, 'click', function(e) {
4955       if (self.VKI_target == this) {
4956         e = e || event;
4957         if (e.stopPropagation) { e.stopPropagation(); } else e.cancelBubble = true;
4958       } return false;
4959     }, false);
4960     if (self.VKI_isMoz)
4961       elem.addEventListener('blur', function() { this.setAttribute('_scrollTop', this.scrollTop); }, false);
4962   };
4963 
4964 
4965   /* ***** Find tagged input & textarea elements ***************** */
4966   function VKI_buildKeyboardInputs() {
4967     var inputElems = [
4968       document.getElementsByTagName('input'),
4969       document.getElementsByTagName('textarea')
4970     ];
4971     for (var x = 0, elem; elem = inputElems[x++];)
4972       for (var y = 0, ex; ex = elem[y++];)
4973         if (ex.nodeName == "TEXTAREA" || ex.type == "text" || ex.type == "password")
4974 				  if (ex.className.indexOf("keyboardInput") > -1) VKI_attach(ex);
4975 
4976     VKI_addListener(document.documentElement, 'click', function(e) { self.VKI_close(); }, false);
4977   }
4978 
4979 
4980   /* ****************************************************************
4981    * Common mouse event actions
4982    *
4983    */
4984   function VKI_mouseEvents(elem) {
4985     if (elem.nodeName == "TD") {
4986       if (!elem.click) elem.click = function() {
4987         var evt = this.ownerDocument.createEvent('MouseEvents');
4988         evt.initMouseEvent('click', true, true, this.ownerDocument.defaultView, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
4989         this.dispatchEvent(evt);
4990       };
4991       elem.VKI_clickless = 0;
4992       VKI_addListener(elem, 'dblclick', function() { return false; }, false);
4993     }
4994     VKI_addListener(elem, 'mouseover', function() {
4995       if (this.nodeName == "TD" && self.VKI_clickless) {
4996         var _self = this;
4997         clearTimeout(this.VKI_clickless);
4998         this.VKI_clickless = setTimeout(function() { _self.click(); }, self.VKI_clickless);
4999       }
5000       if (self.VKI_isIE) this.className += " hover";
5001     }, false);
5002     VKI_addListener(elem, 'mouseout', function() {
5003       if (this.nodeName == "TD") clearTimeout(this.VKI_clickless);
5004       if (self.VKI_isIE) this.className = this.className.replace(/ ?(hover|pressed) ?/g, "");
5005     }, false);
5006     VKI_addListener(elem, 'mousedown', function() {
5007       if (this.nodeName == "TD") clearTimeout(this.VKI_clickless);
5008       if (self.VKI_isIE) this.className += " pressed";
5009     }, false);
5010     VKI_addListener(elem, 'mouseup', function() {
5011       if (this.nodeName == "TD") clearTimeout(this.VKI_clickless);
5012       if (self.VKI_isIE) this.className = this.className.replace(/ ?pressed ?/g, "");
5013     }, false);
5014   }
5015 
5016 
5017   /* ***** Build the keyboard interface ************************** */
5018   this.VKI_keyboard = document.createElement('table');
5019   this.VKI_keyboard.id = "keyboardInputMaster";
5020   this.VKI_keyboard.dir = "ltr";
5021   this.VKI_keyboard.cellSpacing = "0";
5022   this.VKI_keyboard.reflow = function() {
5023     this.style.width = "50px";
5024     var foo = this.offsetWidth;
5025     this.style.width = "";
5026   };
5027   VKI_addListener(this.VKI_keyboard, 'click', function(e) {
5028     e = e || event;
5029     if (e.stopPropagation) { e.stopPropagation(); } else e.cancelBubble = true;
5030     return false;
5031   }, false);
5032 
5033   if (!this.VKI_layout[this.VKI_kt])
5034     return alert('No keyboard named "' + this.VKI_kt + '"');
5035 
5036   this.VKI_langCode = {};
5037   var thead = document.createElement('thead');
5038     var tr = document.createElement('tr');
5039       var th = document.createElement('th');
5040           th.colSpan = "2";
5041 
5042         var kbSelect = document.createElement('div');
5043             kbSelect.title = this.VKI_i18n['02'];
5044           VKI_addListener(kbSelect, 'click', function() {
5045             var ol = this.getElementsByTagName('ol')[0];
5046             if (!ol.style.display) {
5047                 ol.style.display = "block";
5048               var li = ol.getElementsByTagName('li');
5049               for (var x = 0, scr = 0; x < li.length; x++) {
5050                 if (VKI_kt == li[x].firstChild.nodeValue) {
5051                   li[x].className = "selected";
5052                   scr = li[x].offsetTop - li[x].offsetHeight * 2;
5053                 } else li[x].className = "";
5054               } setTimeout(function() { ol.scrollTop = scr; }, 0);
5055             } else ol.style.display = "";
5056           }, false);
5057             kbSelect.appendChild(document.createTextNode(this.VKI_kt));
5058             kbSelect.appendChild(document.createTextNode(this.VKI_isIElt8 ? " \u2193" : " \u25be"));
5059             kbSelect.langCount = 0;
5060           var ol = document.createElement('ol');
5061             for (ktype in this.VKI_layout) {
5062               if (typeof this.VKI_layout[ktype] == "object") {
5063                 if (!this.VKI_layout[ktype].lang) this.VKI_layout[ktype].lang = [];
5064                 for (var x = 0; x < this.VKI_layout[ktype].lang.length; x++)
5065                   this.VKI_langCode[this.VKI_layout[ktype].lang[x].toLowerCase().replace(/-/g, "_")] = ktype;
5066                 var li = document.createElement('li');
5067                     li.title = this.VKI_layout[ktype].name;
5068                   VKI_addListener(li, 'click', function(e) {
5069                     e = e || event;
5070                     if (e.stopPropagation) { e.stopPropagation(); } else e.cancelBubble = true;
5071                     this.parentNode.style.display = "";
5072                     self.VKI_kts = self.VKI_kt = kbSelect.firstChild.nodeValue = this.firstChild.nodeValue;
5073                     self.VKI_buildKeys();
5074                     self.VKI_position(true);
5075                   }, false);
5076                   VKI_mouseEvents(li);
5077                     li.appendChild(document.createTextNode(ktype));
5078                   ol.appendChild(li);
5079                 kbSelect.langCount++;
5080               }
5081             } kbSelect.appendChild(ol);
5082           if (kbSelect.langCount > 1) th.appendChild(kbSelect);
5083         this.VKI_langCode.index = [];
5084         for (prop in this.VKI_langCode)
5085           if (prop != "index" && typeof this.VKI_langCode[prop] == "string")
5086             this.VKI_langCode.index.push(prop);
5087         this.VKI_langCode.index.sort();
5088         this.VKI_langCode.index.reverse();
5089 
5090         if (this.VKI_numberPad) {
5091           var span = document.createElement('span');
5092               span.appendChild(document.createTextNode("#"));
5093               span.title = this.VKI_i18n['00'];
5094             VKI_addListener(span, 'click', function() {
5095               kbNumpad.style.display = (!kbNumpad.style.display) ? "none" : "";
5096               self.VKI_position(true);
5097             }, false);
5098             VKI_mouseEvents(span);
5099             th.appendChild(span);
5100         }
5101 
5102         this.VKI_kbsize = function(e) {
5103           self.VKI_size = Math.min(5, Math.max(1, self.VKI_size));
5104           self.VKI_keyboard.className = self.VKI_keyboard.className.replace(/ ?keyboardInputSize\d ?/, "");
5105           if (self.VKI_size != 2) self.VKI_keyboard.className += " keyboardInputSize" + self.VKI_size;
5106           self.VKI_position(true);
5107           if (self.VKI_isOpera) self.VKI_keyboard.reflow();
5108         };
5109         if (this.VKI_sizeAdj) {
5110           var small = document.createElement('small');
5111               small.title = this.VKI_i18n['10'];
5112             VKI_addListener(small, 'click', function() {
5113               --self.VKI_size;
5114               self.VKI_kbsize();
5115             }, false);
5116             VKI_mouseEvents(small);
5117               small.appendChild(document.createTextNode(this.VKI_isIElt8 ? "\u2193" : "\u21d3"));
5118             th.appendChild(small);
5119           var big = document.createElement('big');
5120               big.title = this.VKI_i18n['11'];
5121             VKI_addListener(big, 'click', function() {
5122               ++self.VKI_size;
5123               self.VKI_kbsize();
5124             }, false);
5125             VKI_mouseEvents(big);
5126               big.appendChild(document.createTextNode(this.VKI_isIElt8 ? "\u2191" : "\u21d1"));
5127             th.appendChild(big);
5128         }
5129 
5130         var span = document.createElement('span');
5131             span.appendChild(document.createTextNode(this.VKI_i18n['07']));
5132             span.title = this.VKI_i18n['08'];
5133           VKI_addListener(span, 'click', function() {
5134             self.VKI_target.value = "";
5135             self.VKI_target.focus();
5136             return false;
5137           }, false);
5138           VKI_mouseEvents(span);
5139           th.appendChild(span);
5140 
5141         var strong = document.createElement('strong');
5142             strong.appendChild(document.createTextNode('X'));
5143             strong.title = this.VKI_i18n['06'];
5144           VKI_addListener(strong, 'click', function() { self.VKI_close(); }, false);
5145           VKI_mouseEvents(strong);
5146           th.appendChild(strong);
5147 
5148         tr.appendChild(th);
5149       thead.appendChild(tr);
5150   this.VKI_keyboard.appendChild(thead);
5151 
5152   var tbody = document.createElement('tbody');
5153     var tr = document.createElement('tr');
5154       var td = document.createElement('td');
5155         var div = document.createElement('div');
5156 
5157         if (this.VKI_deadBox) {
5158           var label = document.createElement('label');
5159             var checkbox = document.createElement('input');
5160                 checkbox.type = "checkbox";
5161                 checkbox.title = this.VKI_i18n['03'] + ": " + ((this.VKI_deadkeysOn) ? this.VKI_i18n['04'] : this.VKI_i18n['05']);
5162                 checkbox.defaultChecked = this.VKI_deadkeysOn;
5163               VKI_addListener(checkbox, 'click', function() {
5164                 this.title = self.VKI_i18n['03'] + ": " + ((this.checked) ? self.VKI_i18n['04'] : self.VKI_i18n['05']);
5165                 self.VKI_modify("");
5166                 return true;
5167               }, false);
5168               label.appendChild(checkbox);
5169                 checkbox.checked = this.VKI_deadkeysOn;
5170             div.appendChild(label);
5171           this.VKI_deadkeysOn = checkbox;
5172         } else this.VKI_deadkeysOn.checked = this.VKI_deadkeysOn;
5173 
5174         if (this.VKI_showVersion) {
5175           var vr = document.createElement('var');
5176               vr.title = this.VKI_i18n['09'] + " " + this.VKI_version;
5177               vr.appendChild(document.createTextNode("v" + this.VKI_version));
5178             div.appendChild(vr);
5179         } td.appendChild(div);
5180         tr.appendChild(td);
5181 
5182       var kbNumpad = document.createElement('td');
5183           kbNumpad.id = "keyboardInputNumpad";
5184         if (!this.VKI_numberPadOn) kbNumpad.style.display = "none";
5185         var ntable = document.createElement('table');
5186             ntable.cellSpacing = "0";
5187           var ntbody = document.createElement('tbody');
5188             for (var x = 0; x < this.VKI_numpad.length; x++) {
5189               var ntr = document.createElement('tr');
5190                 for (var y = 0; y < this.VKI_numpad[x].length; y++) {
5191                   var ntd = document.createElement('td');
5192                     VKI_addListener(ntd, 'click', VKI_keyClick, false);
5193                     VKI_mouseEvents(ntd);
5194                       ntd.appendChild(document.createTextNode(this.VKI_numpad[x][y]));
5195                     ntr.appendChild(ntd);
5196                 } ntbody.appendChild(ntr);
5197             } ntable.appendChild(ntbody);
5198           kbNumpad.appendChild(ntable);
5199         tr.appendChild(kbNumpad);
5200       tbody.appendChild(tr);
5201   this.VKI_keyboard.appendChild(tbody);
5202 
5203   if (this.VKI_isIE6) {
5204     this.VKI_iframe = document.createElement('iframe');
5205     this.VKI_iframe.style.position = "absolute";
5206     this.VKI_iframe.style.border = "0px none";
5207     this.VKI_iframe.style.filter = "mask()";
5208     this.VKI_iframe.style.zIndex = "999999";
5209     this.VKI_iframe.src = this.VKI_imageURI;
5210   }
5211 
5212 
5213   /* ****************************************************************
5214    * Private table cell attachment function for generic characters
5215    *
5216    */
5217   function VKI_keyClick() {
5218     var done = false, character = "\xa0";
5219     if (this.firstChild.nodeName.toLowerCase() != "small") {
5220       if ((character = this.firstChild.nodeValue) == "\xa0") return false;
5221     } else character = this.firstChild.getAttribute('char');
5222     if (self.VKI_deadkeysOn.checked && self.VKI_dead) {
5223       if (self.VKI_dead != character) {
5224         if (character != " ") {
5225           if (self.VKI_deadkey[self.VKI_dead][character]) {
5226             self.VKI_insert(self.VKI_deadkey[self.VKI_dead][character]);
5227             done = true;
5228           }
5229         } else {
5230           self.VKI_insert(self.VKI_dead);
5231           done = true;
5232         }
5233       } else done = true;
5234     } self.VKI_dead = false;
5235 
5236     if (!done) {
5237       if (self.VKI_deadkeysOn.checked && self.VKI_deadkey[character]) {
5238         self.VKI_dead = character;
5239         this.className += " dead";
5240         if (self.VKI_shift) self.VKI_modify("Shift");
5241         if (self.VKI_altgr) self.VKI_modify("AltGr");
5242       } else self.VKI_insert(character);
5243     } self.VKI_modify("");
5244     return false;
5245   }
5246 
5247 
5248   /* ****************************************************************
5249    * Build or rebuild the keyboard keys
5250    *
5251    */
5252   this.VKI_buildKeys = function() {
5253     this.VKI_shift = this.VKI_shiftlock = this.VKI_altgr = this.VKI_altgrlock = this.VKI_dead = false;
5254     var container = this.VKI_keyboard.tBodies[0].getElementsByTagName('div')[0];
5255     var tables = container.getElementsByTagName('table');
5256     for (var x = tables.length - 1; x >= 0; x--) container.removeChild(tables[x]);
5257 
5258     for (var x = 0, hasDeadKey = false, lyt; lyt = this.VKI_layout[this.VKI_kt].keys[x++];) {
5259       var table = document.createElement('table');
5260           table.cellSpacing = "0";
5261         if (lyt.length <= this.VKI_keyCenter) table.className = "keyboardInputCenter";
5262         var tbody = document.createElement('tbody');
5263           var tr = document.createElement('tr');
5264             for (var y = 0, lkey; lkey = lyt[y++];) {
5265               var td = document.createElement('td');
5266                 if (this.VKI_symbol[lkey[0]]) {
5267                   var text = this.VKI_symbol[lkey[0]].split("\n");
5268                   var small = document.createElement('small');
5269                       small.setAttribute('char', lkey[0]);
5270                   for (var z = 0; z < text.length; z++) {
5271                     if (z) small.appendChild(document.createElement("br"));
5272                     small.appendChild(document.createTextNode(text[z]));
5273                   } td.appendChild(small);
5274                 } else td.appendChild(document.createTextNode(lkey[0] || "\xa0"));
5275 
5276                 var className = [];
5277                 if (this.VKI_deadkeysOn.checked)
5278                   for (key in this.VKI_deadkey)
5279                     if (key === lkey[0]) { className.push("deadkey"); break; }
5280                 if (lyt.length > this.VKI_keyCenter && y == lyt.length) className.push("last");
5281                 if (lkey[0] == " " || lkey[1] == " ") className.push("space");
5282                   td.className = className.join(" ");
5283 
5284                 switch (lkey[1]) {
5285                   case "Caps": case "Shift":
5286                   case "Alt": case "AltGr": case "AltLk":
5287                     VKI_addListener(td, 'click', (function(type) { return function() { self.VKI_modify(type); return false; }})(lkey[1]), false);
5288                     break;
5289                   case "Tab":
5290                     VKI_addListener(td, 'click', function() {
5291                       if (self.VKI_activeTab) {
5292                         if (self.VKI_target.form) {
5293                           var target = self.VKI_target, elems = target.form.elements;
5294                           self.VKI_close();
5295                           for (var z = 0, me = false, j = -1; z < elems.length; z++) {
5296                             if (j == -1 && elems[z].getAttribute("VKI_attached")) j = z;
5297                             if (me) {
5298                               if (self.VKI_activeTab == 1 && elems[z]) break;
5299                               if (elems[z].getAttribute("VKI_attached")) break;
5300                             } else if (elems[z] == target) me = true;
5301                           } if (z == elems.length) z = Math.max(j, 0);
5302                           if (elems[z].getAttribute("VKI_attached")) {
5303                             self.VKI_show(elems[z]);
5304                           } else elems[z].focus();
5305                         } else self.VKI_target.focus();
5306                       } else self.VKI_insert("\t");
5307                       return false;
5308                     }, false);
5309                     break;
5310                   case "Bksp":
5311                     VKI_addListener(td, 'click', function() {
5312                       self.VKI_target.focus();
5313                       if (self.VKI_target.setSelectionRange && !self.VKI_target.readOnly) {
5314                         var rng = [self.VKI_target.selectionStart, self.VKI_target.selectionEnd];
5315                         if (rng[0] < rng[1]) rng[0]++;
5316                         self.VKI_target.value = self.VKI_target.value.substr(0, rng[0] - 1) + self.VKI_target.value.substr(rng[1]);
5317                         self.VKI_target.setSelectionRange(rng[0] - 1, rng[0] - 1);
5318                       } else if (self.VKI_target.createTextRange && !self.VKI_target.readOnly) {
5319                         try {
5320                           self.VKI_target.range.select();
5321                         } catch(e) { self.VKI_target.range = document.selection.createRange(); }
5322                         if (!self.VKI_target.range.text.length) self.VKI_target.range.moveStart('character', -1);
5323                         self.VKI_target.range.text = "";
5324                       } else self.VKI_target.value = self.VKI_target.value.substr(0, self.VKI_target.value.length - 1);
5325                       if (self.VKI_shift) self.VKI_modify("Shift");
5326                       if (self.VKI_altgr) self.VKI_modify("AltGr");
5327                       self.VKI_target.focus();
5328                       return true;
5329                     }, false);
5330                     break;
5331                   case "Enter":
5332                     VKI_addListener(td, 'click', function() {
5333                       if (self.VKI_target.nodeName != "TEXTAREA") {
5334                         if (self.VKI_enterSubmit && self.VKI_target.form) {
5335                           for (var z = 0, subm = false; z < self.VKI_target.form.elements.length; z++)
5336                             if (self.VKI_target.form.elements[z].type == "submit") subm = true;
5337                           if (!subm) self.VKI_target.form.submit();
5338                         }
5339                         self.VKI_close();
5340                       } else self.VKI_insert("\n");
5341                       return true;
5342                     }, false);
5343                     break;
5344                   default:
5345                     VKI_addListener(td, 'click', VKI_keyClick, false);
5346 
5347                 } VKI_mouseEvents(td);
5348                 tr.appendChild(td);
5349               for (var z = 0; z < 4; z++)
5350                 if (this.VKI_deadkey[lkey[z] = lkey[z] || ""]) hasDeadKey = true;
5351             } tbody.appendChild(tr);
5352           table.appendChild(tbody);
5353         container.appendChild(table);
5354     }
5355     if (this.VKI_deadBox)
5356       this.VKI_deadkeysOn.style.display = (hasDeadKey) ? "inline" : "none";
5357     if (this.VKI_isIE6) {
5358       this.VKI_iframe.style.width = this.VKI_keyboard.offsetWidth + "px";
5359       this.VKI_iframe.style.height = this.VKI_keyboard.offsetHeight + "px";
5360     }
5361   };
5362 
5363   this.VKI_buildKeys();
5364   VKI_addListener(this.VKI_keyboard, 'selectstart', function() { return false; }, false);
5365   this.VKI_keyboard.unselectable = "on";
5366   if (this.VKI_isOpera)
5367     VKI_addListener(this.VKI_keyboard, 'mousedown', function() { return false; }, false);
5368 
5369 
5370   /* ****************************************************************
5371    * Controls modifier keys
5372    *
5373    */
5374   this.VKI_modify = function(type) {
5375     switch (type) {
5376       case "Alt":
5377       case "AltGr": this.VKI_altgr = !this.VKI_altgr; break;
5378       case "AltLk": this.VKI_altgr = 0; this.VKI_altgrlock = !this.VKI_altgrlock; break;
5379       case "Caps": this.VKI_shift = 0; this.VKI_shiftlock = !this.VKI_shiftlock; break;
5380       case "Shift": this.VKI_shift = !this.VKI_shift; break;
5381     } var vchar = 0;
5382     if (!this.VKI_shift != !this.VKI_shiftlock) vchar += 1;
5383     if (!this.VKI_altgr != !this.VKI_altgrlock) vchar += 2;
5384 
5385     var tables = this.VKI_keyboard.tBodies[0].getElementsByTagName('div')[0].getElementsByTagName('table');
5386     for (var x = 0; x < tables.length; x++) {
5387       var tds = tables[x].getElementsByTagName('td');
5388       for (var y = 0; y < tds.length; y++) {
5389         var className = [], lkey = this.VKI_layout[this.VKI_kt].keys[x][y];
5390 
5391         switch (lkey[1]) {
5392           case "Alt":
5393           case "AltGr":
5394             if (this.VKI_altgr) className.push("pressed");
5395             break;
5396           case "AltLk":
5397             if (this.VKI_altgrlock) className.push("pressed");
5398             break;
5399           case "Shift":
5400             if (this.VKI_shift) className.push("pressed");
5401             break;
5402           case "Caps":
5403             if (this.VKI_shiftlock) className.push("pressed");
5404             break;
5405           case "Tab": case "Enter": case "Bksp": break;
5406           default:
5407             if (type) {
5408               tds[y].removeChild(tds[y].firstChild);
5409               if (this.VKI_symbol[lkey[vchar]]) {
5410                 var text = this.VKI_symbol[lkey[vchar]].split("\n");
5411                 var small = document.createElement('small');
5412                     small.setAttribute('char', lkey[vchar]);
5413                 for (var z = 0; z < text.length; z++) {
5414                   if (z) small.appendChild(document.createElement("br"));
5415                   small.appendChild(document.createTextNode(text[z]));
5416                 } tds[y].appendChild(small);
5417               } else tds[y].appendChild(document.createTextNode(lkey[vchar] || "\xa0"));
5418             }
5419             if (this.VKI_deadkeysOn.checked) {
5420               var character = tds[y].firstChild.nodeValue || tds[y].firstChild.className;
5421               if (this.VKI_dead) {
5422                 if (character == this.VKI_dead) className.push("pressed");
5423                 if (this.VKI_deadkey[this.VKI_dead][character]) className.push("target");
5424               }
5425               if (this.VKI_deadkey[character]) className.push("deadkey");
5426             }
5427         }
5428 
5429         if (y == tds.length - 1 && tds.length > this.VKI_keyCenter) className.push("last");
5430         if (lkey[0] == " " || lkey[1] == " ") className.push("space");
5431         tds[y].className = className.join(" ");
5432       }
5433     }
5434   };
5435 
5436 
5437   /* ****************************************************************
5438    * Insert text at the cursor
5439    *
5440    */
5441   this.VKI_insert = function(text) {
5442     this.VKI_target.focus();
5443     if (this.VKI_target.maxLength) this.VKI_target.maxlength = this.VKI_target.maxLength;
5444     if (typeof this.VKI_target.maxlength == "undefined" ||
5445         this.VKI_target.maxlength < 0 ||
5446         this.VKI_target.value.length < this.VKI_target.maxlength) {
5447       if (this.VKI_target.setSelectionRange && !this.VKI_target.readOnly && !this.VKI_isIE) {
5448         var rng = [this.VKI_target.selectionStart, this.VKI_target.selectionEnd];
5449         this.VKI_target.value = this.VKI_target.value.substr(0, rng[0]) + text + this.VKI_target.value.substr(rng[1]);
5450         if (text == "\n" && this.VKI_isOpera) rng[0]++;
5451         this.VKI_target.setSelectionRange(rng[0] + text.length, rng[0] + text.length);
5452       } else if (this.VKI_target.createTextRange && !this.VKI_target.readOnly) {
5453         try {
5454           this.VKI_target.range.select();
5455         } catch(e) { this.VKI_target.range = document.selection.createRange(); }
5456         this.VKI_target.range.text = text;
5457         this.VKI_target.range.collapse(true);
5458         this.VKI_target.range.select();
5459       } else this.VKI_target.value += text;
5460       if (this.VKI_shift) this.VKI_modify("Shift");
5461       if (this.VKI_altgr) this.VKI_modify("AltGr");
5462       this.VKI_target.focus();
5463     } else if (this.VKI_target.createTextRange && this.VKI_target.range)
5464       this.VKI_target.range.select();
5465   };
5466 
5467 
5468   /* ****************************************************************
5469    * Show the keyboard interface
5470    *
5471    */
5472   this.VKI_show = function(elem) {
5473     if (!this.VKI_target) {
5474       this.VKI_target = elem;
5475       if (this.VKI_langAdapt && this.VKI_target.lang) {
5476         var chg = false, sub = [], lang = this.VKI_target.lang.toLowerCase().replace(/-/g, "_");
5477         for (var x = 0, chg = false; !chg && x < this.VKI_langCode.index.length; x++)
5478           if (lang.indexOf(this.VKI_langCode.index[x]) == 0)
5479             chg = kbSelect.firstChild.nodeValue = this.VKI_kt = this.VKI_langCode[this.VKI_langCode.index[x]];
5480         if (chg) this.VKI_buildKeys();
5481       }
5482       if (this.VKI_isIE) {
5483         if (!this.VKI_target.range) {
5484           this.VKI_target.range = this.VKI_target.createTextRange();
5485           this.VKI_target.range.moveStart('character', this.VKI_target.value.length);
5486         } this.VKI_target.range.select();
5487       }
5488       try { this.VKI_keyboard.parentNode.removeChild(this.VKI_keyboard); } catch (e) {}
5489       if (this.VKI_clearPasswords && this.VKI_target.type == "password") this.VKI_target.value = "";
5490 
5491       var elem = this.VKI_target;
5492       this.VKI_target.keyboardPosition = "absolute";
5493       do {
5494         if (VKI_getStyle(elem, "position") == "fixed") {
5495           this.VKI_target.keyboardPosition = "fixed";
5496           break;
5497         }
5498       } while (elem = elem.offsetParent);
5499 
5500       if (this.VKI_isIE6) document.body.appendChild(this.VKI_iframe);
5501       document.body.appendChild(this.VKI_keyboard);
5502       this.VKI_keyboard.style.position = this.VKI_target.keyboardPosition;
5503       if (this.VKI_isOpera) this.VKI_keyboard.reflow();
5504 
5505       this.VKI_position(true);
5506       if (self.VKI_isMoz || self.VKI_isWebKit) this.VKI_position(true);
5507       this.VKI_target.blur();
5508       this.VKI_target.focus();
5509     } else this.VKI_close();
5510   };
5511 
5512 
5513   /* ****************************************************************
5514    * Position the keyboard
5515    *
5516    */
5517   this.VKI_position = function(force) {
5518     if (self.VKI_target) {
5519       var kPos = VKI_findPos(self.VKI_keyboard), wDim = VKI_innerDimensions(), sDis = VKI_scrollDist();
5520       var place = false, fudge = self.VKI_target.offsetHeight + 3;
5521       if (force !== true) {
5522         if (kPos[1] + self.VKI_keyboard.offsetHeight - sDis[1] - wDim[1] > 0) {
5523           place = true;
5524           fudge = -self.VKI_keyboard.offsetHeight - 3;
5525         } else if (kPos[1] - sDis[1] < 0) place = true;
5526       }
5527       if (place || force === true) {
5528         var iPos = VKI_findPos(self.VKI_target), scr = self.VKI_target;
5529         while (scr = scr.parentNode) {
5530           if (scr == document.body) break;
5531           if (scr.scrollHeight > scr.offsetHeight || scr.scrollWidth > scr.offsetWidth) {
5532             if (!scr.getAttribute("VKI_scrollListener")) {
5533               scr.setAttribute("VKI_scrollListener", true);
5534               VKI_addListener(scr, 'scroll', function() { self.VKI_position(true); }, false);
5535             } // Check if the input is in view
5536             var pPos = VKI_findPos(scr), oTop = iPos[1] - pPos[1], oLeft = iPos[0] - pPos[0];
5537             var top = oTop + self.VKI_target.offsetHeight;
5538             var left = oLeft + self.VKI_target.offsetWidth;
5539             var bottom = scr.offsetHeight - oTop - self.VKI_target.offsetHeight;
5540             var right = scr.offsetWidth - oLeft - self.VKI_target.offsetWidth;
5541             self.VKI_keyboard.style.display = (top < 0 || left < 0 || bottom < 0 || right < 0) ? "none" : "";
5542             if (self.VKI_isIE6) self.VKI_iframe.style.display = (top < 0 || left < 0 || bottom < 0 || right < 0) ? "none" : "";
5543           }
5544         }
5545         self.VKI_keyboard.style.top = iPos[1] - ((self.VKI_target.keyboardPosition == "fixed" && !self.VKI_isIE && !self.VKI_isMoz) ? sDis[1] : 0) + fudge + "px";
5546         self.VKI_keyboard.style.left = Math.max(10, Math.min(wDim[0] - self.VKI_keyboard.offsetWidth - 25, iPos[0])) + "px";
5547         if (self.VKI_isIE6) {
5548           self.VKI_iframe.style.width = self.VKI_keyboard.offsetWidth + "px";
5549           self.VKI_iframe.style.height = self.VKI_keyboard.offsetHeight + "px";
5550           self.VKI_iframe.style.top = self.VKI_keyboard.style.top;
5551           self.VKI_iframe.style.left = self.VKI_keyboard.style.left;
5552         }
5553       }
5554       if (force === true) self.VKI_position();
5555     }
5556   };
5557 
5558 
5559   /* ****************************************************************
5560    * Close the keyboard interface
5561    *
5562    */
5563   this.VKI_close = VKI_close = function() {
5564     if (this.VKI_target) {
5565       try {
5566         this.VKI_keyboard.parentNode.removeChild(this.VKI_keyboard);
5567         if (this.VKI_isIE6) this.VKI_iframe.parentNode.removeChild(this.VKI_iframe);
5568       } catch (e) {}
5569       if (this.VKI_kt != this.VKI_kts) {
5570         kbSelect.firstChild.nodeValue = this.VKI_kt = this.VKI_kts;
5571         this.VKI_buildKeys();
5572       } kbSelect.getElementsByTagName('ol')[0].style.display = "";;
5573       this.VKI_target.focus();
5574       if (this.VKI_isIE) {
5575         setTimeout(function() { self.VKI_target = false; }, 0);
5576       } else this.VKI_target = false;
5577     }
5578   };
5579 
5580 
5581   /* ***** Private functions *************************************** */
5582   function VKI_addListener(elem, type, func, cap) {
5583     if (elem.addEventListener) {
5584       elem.addEventListener(type, function(e) { func.call(elem, e); }, cap);
5585     } else if (elem.attachEvent)
5586       elem.attachEvent('on' + type, function() { func.call(elem); });
5587   }
5588 
5589   function VKI_findPos(obj) {
5590     var curleft = curtop = 0, scr = obj;
5591     while ((scr = scr.parentNode) && scr != document.body) {
5592       curleft -= scr.scrollLeft || 0;
5593       curtop -= scr.scrollTop || 0;
5594     }
5595     do {
5596       curleft += obj.offsetLeft;
5597       curtop += obj.offsetTop;
5598     } while (obj = obj.offsetParent);
5599     return [curleft, curtop];
5600   }
5601 
5602   function VKI_innerDimensions() {
5603     if (self.innerHeight) {
5604       return [self.innerWidth, self.innerHeight];
5605     } else if (document.documentElement && document.documentElement.clientHeight) {
5606       return [document.documentElement.clientWidth, document.documentElement.clientHeight];
5607     } else if (document.body)
5608       return [document.body.clientWidth, document.body.clientHeight];
5609     return [0, 0];
5610   }
5611 
5612   function VKI_scrollDist() {
5613     var html = document.getElementsByTagName('html')[0];
5614     if (html.scrollTop && document.documentElement.scrollTop) {
5615       return [html.scrollLeft, html.scrollTop];
5616     } else if (html.scrollTop || document.documentElement.scrollTop) {
5617       return [html.scrollLeft + document.documentElement.scrollLeft, html.scrollTop + document.documentElement.scrollTop];
5618     } else if (document.body.scrollTop)
5619       return [document.body.scrollLeft, document.body.scrollTop];
5620     return [0, 0];
5621   }
5622 
5623   function VKI_getStyle(obj, styleProp) {
5624     if (obj.currentStyle) {
5625       var y = obj.currentStyle[styleProp];
5626     } else if (window.getComputedStyle)
5627       var y = window.getComputedStyle(obj, null)[styleProp];
5628     return y;
5629   }
5630 
5631 
5632   VKI_addListener(window, 'resize', this.VKI_position, false);
5633   VKI_addListener(window, 'scroll', this.VKI_position, false);
5634   this.VKI_kbsize();
5635   VKI_addListener(window, 'load', VKI_buildKeyboardInputs, false);
5636   // VKI_addListener(window, 'load', function() {
5637   //   setTimeout(VKI_buildKeyboardInputs, 5);
5638   // }, false);
5639 })();
5640 function okrugldo(a,b){
5641 /**Округлить a с точностью до b*/
5642 	if(!b)
5643 		b=1;
5644 	a=Math.round(a/b)*b;
5645 	return a;
5646 }
5647 function sluchch(n,k,s){
5648 /**Случайное число от n до k с шагом s.
5649 Если s опущено - с шагом 1.
5650 Если k опущено - от 0 до n*/
5651 	if(!s)
5652 		s=1;
5653 	if(k==undefined)
5654 		return sluchch(0,n,1);
5655 	
5656 	return okrugldo(Math.random() * (k-n),s) + n;
5657 }
5658 
5659 function slKrome(a,p1,p2,p3){
5660 /**Случайное число, кроме a:
5661 если a - массив, то не содержащееся в нём;
5662 если a - число или строка, то не равное ему;
5663 если a - функция, принимающая параметр - то не удовлетворяющее ей (т. е. чтобы функция вернула 0).*/
5664 	var b;
5665 	
5666 	if(a.isNumber || a.isString)
5667 		do{
5668 			b=sl(p1,p2,p3);
5669 		}while(b==a);
5670 	else if(a.isArray)
5671 		if(a.length)
5672 			do{
5673 				b=sl(p1,p2,p3);
5674 			}while(a.hasElem(b));
5675 		else
5676 			return sl(p1,p2,p3);
5677 	else if(a.isFunction)
5678 		do{
5679 			b=sl(p1,p2,p3);
5680 		}while(a(b));
5681 	else
5682 		console.error('Первый параметр функции slKrome должен быть числом, строкой, массивом или функцией.');
5683 	return b;
5684 }
5685 
5686 function sluchDel(a){
5687 /**Случайный делитель числа a*/
5688 	return a.sluchDel();
5689 }
5690 
5691 function sluchiz(a,n){
5692 /**Массив n случайных неповторяющихся элементов массива a*/	
5693 	if(!(n>=1))
5694 		n=1;
5695 	var b=a.slice();
5696 	b.shuffle();
5697 	b.length=n;
5698 	return b;
5699 }
5700 
5701 function chislit(a,s1,s2,s5){
5702 /**Вспомогательная процедура*/
5703 	a=a%100;
5704 	if((a>=5)&&(a<=20))
5705 		return s5;
5706 	
5707 	a=a%10;
5708 	if(a==1)
5709 		return s1;
5710 	
5711 	if((a<=4)&&(a>=2))
5712 		return s2;
5713 	
5714 	return s5;
5715 }
5716 
5717 function s3ug(Ax,Ay,Bx,By,Cx,Cy){
5718 /**Площадь треугольника по координатам трёх вершин.*/
5719 	return 0.5*(Ax*By+Ay*Cx+Bx*Cy-By*Cx-Cy*Ax-Ay*Bx).abs();
5720 }
5721 
5722 function chislitM(p1,p2,p3,p4){
5723 	return p1.ts()+' '+chislit(p1,p2,p3,p4);
5724 }
5725 
5726 function chislitlx(p1,p2,p3){
5727 /***/
5728 	var rez=sklonlxkand(p2,undefined,0);
5729 	switch(p3){
5730 		case 'i': return chislitM(p1,	rez.ie,	(rez.r2?rez.r2:rez.re),	rez.rm);
5731 		case 'r': return chislitM(p1,	rez.re,	 rez.rm,				rez.rm);
5732 		case 'd': return chislitM(p1,	rez.de,	 rez.dm,				rez.dm);
5733 		case 'v': return chislitM(p1,	rez.ve,	(rez.r2?rez.r2:rez.ve),	rez.vm);
5734 		case 't': return chislitM(p1,	rez.te,	 rez.tm,				rez.tm);
5735 		case 'p': return chislitM(p1,	rez.pe,	 rez.pm,				rez.pm);
5736 	}
5737 	return chislitM(p1,rez.ie,(rez.r2?rez.r2:rez.re),rez.rm);
5738 }
5739 
5740 var Drob={};
5741 
5742 Drob.prov=function(p1){
5743 	p1=Drob.fixN(p1);
5744 	return !!p1.ch&&!!p1.zn;
5745 }
5746 
5747 Drob.fixN=function(p1){
5748 	if(p1.isNumber)
5749 		p1={ch:p1,zn:1};
5750 	return p1;
5751 }
5752 
5753 Drob.sokr=function(p1){
5754 	p1=Drob.fixN(p1);
5755 	if(!Drob.prov(p1))return null;
5756 	if(p1.zn<0){
5757 		p1.ch*=-1;
5758 		p1.zn*=-1;
5759 	}
5760 	var a1=p1.ch.nod(p1.zn);
5761 	p1.ch/=a1;
5762 	p1.zn/=a1;
5763 	return p1;
5764 }
5765 
5766 function clone(obj){
5767 	if(obj == null || typeof(obj) != 'object')
5768 		return obj;
5769 	
5770 	var temp = {};
5771 	for(var key in obj)
5772 		if(obj[key] === undefined)
5773 			temp[key]=undefined;
5774 		else if(obj[key].isArray)
5775 			temp[key]=obj[key].slice();
5776 		else
5777 			temp[key] = clone(obj[key]);
5778 	return temp;
5779 }
5780 
5781 function sl1(){
5782 	return Math.random().round();
5783 }
5784 
5785 function sp(a){//Я просто оставлю это здесь
5786 	for(var i=0,c=a.split('\''),b=[];i<c.length;i++)
5787 		b=b.concat(i%2?c[i]:c[i].split(' '));
5788 	for(var i=0;i<b.length;b.splice(i,!b[i++])){};
5789 	return b;
5790 }
5791 
5792 function cvet(a){
5793 	return '#'+a.r.toString(16).dopdo('0',2)+a.g.toString(16).dopdo('0',2)+a.b.toString(16).dopdo('0',2);
5794 }
5795 
5796 function proporMezhdu(a,b,pr){
5797 	return a.proporMezhdu(b,pr);
5798 }
5799 
5800 function cvetMezhdu(a,b,pr){
5801 	return cvet({
5802 		r:proporMezhdu(a.r,b.r,pr).round(),
5803 		g:proporMezhdu(a.g,b.g,pr).round(),
5804 		b:proporMezhdu(a.b,b.b,pr).round(),
5805 	});
5806 }
5807 
5808 function perevodVelichin(a){
5809 /**Наброски движка про перевод величин*/
5810 	var edIzm=a.iz(2);
5811 	var ishIzm=edIzm[0];
5812 	var rezIzm=edIzm[1];
5813 	var koef=sl(0.1,9.9,0.1)*10 .pow(sl(-1,1));
5814 	var otv=koef*ishIzm[1]/rezIzm[1];
5815 	window.vopr.txt='Выразите '+chislitlx(koef,ishIzm[0])+' в '+lx[rezIzm[0]].pm;
5816 	window.vopr.ver=[otv.ts()];
5817 }
5818 
5819 
5820 function multiplyMatrix(A,B){//http://mathhelpplanet.com/viewtopic.php?f=44&t=22337
5821 	var rowsA = A.length,
5822 		colsA = A[0].length,
5823 		rowsB = B.length,
5824 		colsB = B[0].length,
5825 		C = [];
5826 	for(var i=0; i<rowsA; i++)
5827 		C[i]=[];
5828 	for(	var k=0; k<colsB; k++)
5829 		for(	var i=0; i < rowsA; i++){
5830 			var temp=0;
5831 			for(	var j = 0; j < rowsB; j++)
5832 				temp += A[i][j]*B[j][k];
5833 			C[i][k] = temp;
5834 		}
5835 	return C;
5836 }
5837 
5838 function Determinant(A){	// Определитель матрицы (используется алгоритм Барейса)
5839 	var N=A.length,
5840 		B=[],
5841 		denom=1,
5842 		exchanges=0;
5843 	for(var i=0; i<N; ++i){
5844 		B[i]=[];
5845 		for(var j=0; j<N; ++j)
5846 			B[i][j] = A[i][j];
5847 	}
5848 	for(var i=0; i<N-1; ++i){
5849 		var maxN=i,
5850 		maxValue=Math.abs(B[i][i]);
5851 		for(var j=i+1; j<N; ++j){
5852 			var value=Math.abs(B[j][i]);
5853 			if(value>maxValue){
5854 				maxN=j;
5855 				maxValue = value;
5856 			}
5857 		}
5858 		if(maxN>i){
5859 			var temp = B[i]; B[i] = B[maxN]; B[maxN] = temp;
5860 			++exchanges;
5861 		}else if(maxValue==0)
5862 			return maxValue; 
5863 		var value1=B[i][i];
5864 		for(var j = i+1; j < N; ++j){
5865 			var value2=B[j][i];
5866 			B[j][i]=0;
5867 			for(var k=i+1; k<N; ++k)
5868 				B[j][k]=(B[j][k]*value1-B[i][k]*value2)/denom;
5869 		}
5870 		denom=value1;
5871 	} //@ http://mathhelpplanet.com/viewtopic.php?f=44&t=22390
5872 	if(exchanges%2)
5873 		return -B[N-1][N-1];
5874 	else
5875 		return B[N-1][N-1];
5876 }
5877 
5878 function MatrixCofactor(i,j,A){   //Алгебраическое дополнение матрицы
5879 	var N=A.length,
5880 		sign=((i+j)%2==0) ? 1 : -1;
5881 	for(var m=0; m<N; m++){
5882 		for(var n=j+1; n<N; n++)
5883 			A[m][n-1]=A[m][n];
5884 		A[m].length--;
5885 	}
5886 	for(var k=i+1; k<N; k++)
5887 		A[k-1] = A[k];
5888 	A.length--;
5889 	return sign*Determinant(A);
5890 }
5891 
5892 function AdjugateMatrix(A){   //Союзная (присоединённая) матрица
5893 	var N=A.length,
5894 		B=[],
5895 		adjA=[];
5896 	for(var i=0; i<N; i++){
5897 		adjA[i]=[]; 
5898 		for(var j=0; j<N; j++){
5899 			for(var m=0; m<N; m++)
5900 			{
5901 				B[m]=[];
5902 				for(var n = 0; n < N; n++)
5903 					B[m][n] = A[m][n];
5904 			}
5905 			adjA[i][j] = MatrixCofactor(j,i,B);
5906 		}
5907 	}
5908 	return adjA;
5909 }
5910 
5911 function InverseMatrix(B){   // Обратная матрица
5912 	var det=Determinant(B);
5913 	if(!det)
5914 		return false;
5915 	var N=B.length,
5916 		A = AdjugateMatrix(B);
5917 	for(var i=0; i<N; i++)
5918 		for(var j=0; j<N; j++)
5919 			A[i][j] /= det; 
5920 	return A;
5921 }
5922 
5923 function objSum(a,b){
5924 /**Сложение двух матриц или двух чисел.*/
5925 	if(!a)
5926 		return b;
5927 	if(!b)
5928 		return a;
5929 	if(a.isNumber && b.isNumber)
5930 		return a+b;
5931 	if(a.isArray && b.isArray)
5932 		return a.map(function(a1,b1){
5933 			return objSum(a1,b[b1]);
5934 		});
5935 	return undefined;
5936 }
5937 
5938 function objUmn(a,b){
5939 /**Умножение a на b (матрица или число)*/
5940 	if(!a || !b)
5941 		return 0;
5942 	if(a.isNumber && b.isNumber)
5943 		return a*b;
5944 	if(a.isArray && b.isArray)
5945 		return multiplyMatrix(a,b);
5946 	if(a.isArray && b.isNumber)
5947 		return a.map(function(a1){
5948 			return objUmn(a1,b);
5949 		});
5950 	if(b.isArray && a.isNumber)
5951 		return objUmn(b,a);
5952 	
5953 	return undefined;
5954 }
5955 
5956 function generateMatrix(stroki,stolbcy,min,max,p1){
5957 /**Генерирует матрицу из случайных чисел. min, max и p1 - параметры sluchch.*/
5958 	var rez=[];
5959 	for(var i=0;i<stroki;i++){
5960 		rez[i]=[];
5961 		for(var j=0;j<stolbcy;j++)
5962 			rez[i][j]=sl(min,max,p1);
5963 	}
5964 	return rez;
5965 }
5966 
5967 function generateScalMatrix(x,n){
5968 /**Генерирует скалярную иатрицу n на n с числом x на главной диагонали.*/
5969 	var rez=generateMatrix(n,n,0);
5970 	for(var i=0;i<n;i++)
5971 		rez[i][i]=x;
5972 	return rez;
5973 }
5974 
5975 //перевод числа x из системы с основанием sysBefore в систему с основанием sysAfter
5976 function intoAnotherSystem(x,sysBefore,sysAfter) {
5977 //перевод из заданной в 10-ную
5978 	var i=String(x).length;
5979 	var c = 1;
5980 	var x10 = 0;
5981 	while (i>0) {
5982 		var t = String(x).charAt(i-1)*1;
5983 		if (isNaN(t))
5984 			t = String(x).charCodeAt(i-1)-String("A").charCodeAt(0)+10;
5985 		x10 = t*c+x10;
5986 		i=i-1;
5987 		c = c*sysBefore;
5988 	}
5989 //перевод из 10-ной в заданную
5990 	var finall = '';
5991 	while (x10>0) {
5992 		var t = String(x10 % sysAfter);
5993 		if (x10 % sysAfter >= 10)
5994 			t = String.fromCharCode(String("A").charCodeAt(0)+(x10 % sysAfter)-10);
5995 		x10 = Math.floor(x10/sysAfter);
5996 		finall = t+finall;
5997 	}
5998 	return(finall);
5999 }
6000 
6001 function isZ(n){
6002 /**Является ли n целым числом.*/
6003 	return n.isZ();
6004 }
6005 
6006 function isPolnKvadr(n){
6007 /**Является ли n полным квадратом.*/
6008 	return n.isPolnKvadr();
6009 }
6010 
6011 document.writeln=function(p1){
6012 	return document.write(p1+'<br/>');
6013 }
6014 
6015 function hasErrors(p,bdr){
6016 	if(p==undefined)
6017 		return 'undefined; '
6018 	if(p.isFunction)
6019 		return 0;
6020 	var rez='';
6021 	if(p.isNumber)
6022 		p=''+p;
6023 	if(p.isString){
6024 		if(p.match(/NaN/))
6025 			rez+='NaN; ';
6026 		if(p.match(/undefined/))
6027 			rez+='undefined; ';
6028 		if(p.match(/Infinity/))
6029 			rez+='Infinity; ';
6030 		if(p.match(/[.,][0-9]*00000/))
6031 			rez+='00000; ';
6032 		if(!bdr && p.reverse().match(/[0-9]{6,}[.,](?!0("|sir))/))
6033 			rez+='6 и более цифр после десятичной запятой '+
6034 				'(если так и должно быть, установите vopr.kat.bdr значение 1; ';
6035 	}
6036 	if(p.isArray){
6037 		for(var i=0;i<p.length;i++){
6038 			rez+=hasErrors(p[i]);
6039 		}
6040 	}
6041 	return rez;
6042 }
6043 
6044 function rang_mat(A){//Отсюда: http://liloisproj.narod.ru/mat_rang.htm
6045 	var i=A.length;
6046 	var j=A[0].length;
6047 	var q = Math.min(i,j);
6048 
6049 	while(q) // проверка: порядок матрицы меньше или равен минимальному из размеров матрицы?
6050 	{ // если да
6051 		var B = []; // создаем новую матрицу размера q
6052 		for(var w=0;w<q;w++)
6053 			B[w]=[];
6054 		
6055 		for(var a=0;a<(i-(q-1));a++) // тут начинается перебор матриц q-го порядка
6056 		{
6057 			for(var b=0;b<(j-(q-1));b++)
6058 			{
6059 				for(var c=0;c<q;c++)
6060 				{
6061 					for(var d=0;d<q;d++)
6062 					{
6063 						B[c][d] = A[a+c][b+d];
6064 					}
6065 				}
6066 
6067 				if(B.det()) // если определитель матрицы отличен от нуля
6068 				{ // то
6069 					return q; // присваиваем рангу значение q
6070 				}
6071 			}
6072 		}
6073 		q--;
6074 	}
6075 	return 0;
6076 }
6077 
6078 function getLen(x1, x2, y1, y2){
6079 	return Math.sqrt( Math.pow(x1-x2, 2)+Math.pow(y1-y2, 2) );
6080 }
6081 
6082 function getRandomInt(min, max){
6083 	return Math.floor(Math.random() * (max - min + 1)) + min;
6084 }
6085 
6086 function makeStruct(strNames){
6087 	var names = strNames.split(' ');
6088 	var count = names.length;
6089 	function constructor(){
6090 		for (var i = 0; i < count; i++){
6091 			this[names[i]] = arguments[i];
6092 		}
6093 	}
6094 	return constructor;
6095 }
6096 
6097 function make2Array(ch,k) {
6098 /**из числа делает массив 0 и 1 с количеством элементов k*/
6099 	var x=[];
6100 	for (var i=0; i<k; i++) {
6101 		var t=ch % 2;
6102 		ch = Math.floor(ch / 2);
6103 		x.push(t);
6104 	}
6105 	return x;
6106 }
6107 
6108 function parseLogic(exp) {
6109 /**преобразует логическое выражение в выражение, доступное для вычисления*/
6110 	while (exp.indexOf('>')!=-1){
6111 		var t = exp.indexOf('>');
6112 		var A = findA(exp,t);
6113 		exp=exp.insert(A,'!');
6114 		exp = exp.replace('>','||');
6115 	}
6116 	while (exp.indexOf('~')!=-1){
6117 		var t = exp.indexOf('~');
6118 		var A = findA(exp,t);
6119 		var B = findB(exp,t);
6120 		var exp1=exp.substring(A,t);
6121 		var exp2=exp.substring(t+1,B+1);
6122 		exp = exp.replace(exp1+'~'+exp2,'('+exp1+'&&'+exp2+')'+'||(!'+exp1+'&&!'+exp2+')');
6123 	}
6124 	return exp;
6125 }
6126 
6127 function findA(exp,t) {
6128 	var i=t-1;
6129 	if (exp[t-1]==')') {
6130 		var k = 1;
6131 		while (k>0){
6132 			i--;
6133 			if (exp[i]==')')
6134 				k++;
6135 			else if (exp[i]=='(')
6136 				k--;
6137 		}
6138 	}
6139 	else
6140 		i=i-3;
6141 	while (exp[i-1]=='!')
6142 		i--;
6143 	return i;
6144 }
6145 
6146 function findB(exp,t) {
6147 	var i=t+1;
6148 	while (exp[i]=='!')
6149 		i++;
6150 	if (exp[t+1]=='(') {
6151 		var k = 1;
6152 		while (k>0){
6153 			i++;
6154 			if (exp[i]=='(')
6155 				k++;
6156 			else if (exp[i]==')')
6157 				k--;
6158 		}
6159 	}
6160 	else
6161 		i = i+3;
6162 	return i;
6163 }
6164 
6165 function printLogic(exp) {
6166 /**¬ - отрицание
6167 → - стрелка направо
6168 ∧ - Логическая и
6169 ∨ - Логическая иили
6170 ≡ - Идентичный, тождество
6171 печатает логическое выражение*/
6172 	exp=exp.replace(/\|\|/g,'∨');
6173 	exp=exp.replace(/\&\&/g,'∧');
6174 	exp=exp.replace(/\~/g,'≡');
6175 	exp=exp.replace(/\>/g,'→');
6176 	exp=exp.replace(/\!/g,'¬');
6177 	var re = /x\[(\d)\]/g;
6178 	exp = exp.replace(re, function(str,a) { return 'X'+(Number(a)+1) });
6179 
6180 	return exp;
6181 }
6182 
6183 function genLogFunc(k,b) {
6184 /**генерирует логическую функцию*/
6185 	var t=0;
6186 	var f='';
6187 	for (var i=0;i<k;i++) {
6188 		var d3=sl1();
6189 		if (d3&&i!=0) {
6190 			f=f+'(';
6191 			t++;
6192 		}
6193 		f+='!'.esli(sl1());
6194 		f=f+'x['+i+']';
6195 		if (i!=k-1)	{
6196 			var d4=sl1();
6197 			if (d4&&t>0) {
6198 				f=f+')';
6199 				t--;
6200 			}
6201 			var d2=0;
6202 			if (!b)
6203 				d2=sluchch(3);
6204 			else
6205 				d2=sluchch(1,2);
6206 			switch (d2) {
6207 				case 0: 
6208 					f='('+f+')';
6209 					f=f+'>';
6210 					break;
6211 				case 1: 
6212 					f=f+'||';
6213 					break;
6214 				case 2: 
6215 					f=f+'&&';
6216 					break;
6217 				case 3: 
6218 					f='('+f+')'+'~'+'(';
6219 					t++;
6220 					break;
6221 			}
6222 		}
6223 	}
6224 	for (var i=0; i<t; i++)
6225 		f=f+')';
6226 	//убираем лишние скобки
6227 	var re = /\(x\[(\d)\]\)/g;
6228 	while (f.search(re)!=-1) {
6229 		f = f.replace(re, "x[$1]");
6230 	}
6231 	re = /\(!x\[(\d)\]\)/g;
6232 	while (f.search(re)!=-1) {
6233 		f = f.replace(re, "!x[$1]");
6234 	}
6235 	return f;
6236 }
6237 
6238 function slLetter(b) {
6239 /**генерирует случайную букву английского алфавита*/
6240 	var a = '';
6241 	if (!b)
6242 		a = String.fromCharCode('a'.charCodeAt(0)+sluchch(25));
6243 	else {
6244 		if (b.isString) {
6245 			var temp = b.charCodeAt(0)-'a'.charCodeAt(0);
6246 			a = String.fromCharCode('a'.charCodeAt(0)+slKrome(temp,25));
6247 		}
6248 		else if (b.isArray) {
6249 			var temp=[];
6250 			for (var i=0; i<b.length; i++)
6251 				temp[i] = b[i].charCodeAt(0)-'a'.charCodeAt(0);
6252 			a = String.fromCharCode('a'.charCodeAt(0)+slKrome(temp,25));
6253 		}
6254 	}
6255 	return a;
6256 }
6257 
6258 function genMask() {
6259 /**генерирует случайную маску*/
6260 	var l = sluchch(5,10);//количество символов в маске
6261 	var mask = '';
6262 	for (var i=0; i<l; i++) {
6263 		var d = sluchch(3);
6264 		switch(d) {
6265 			case 0:
6266 				mask+='?';
6267 				break;
6268 			case 1:
6269 				mask+='*';
6270 				break;
6271 			case 2:
6272 			case 3:
6273 				mask+=slLetter();
6274 				break;
6275 			
6276 		}
6277 	}
6278 	if (mask.search(/\?/)==-1)
6279 		mask = mask+'?';
6280 	return mask;
6281 }
6282 
6283 function genWrongWordForMask(rmask) {
6284 /**генерирует случайное слово, похожее на маску, но с ошибкой*/
6285 	var word='';
6286 	var reg = rmask.replace(/\*/g,'[a-z]*').replace(/\?/g,'[a-z]');
6287 	var mask = rmask;
6288 	do{
6289 		var re1 = /\*+\?\**|\**\?\*+/;//*?*
6290 		var re2 = /([^\*]*)\?([^\*]*)/;//?
6291 		if (sl1()&& mask.search(re1)!=-1) {
6292 			mask=mask.replace(re1,'');
6293 		}
6294 		else if (sl1() && mask.search(re2)!=-1) {
6295 			var w='';
6296 			var d = slKrome(1,3);
6297 			for (var j=0; j<d; j++)
6298 				w+=slLetter();
6299 			mask=mask.replace(re2,"$1"+w+"$2");
6300 		}
6301 		else {
6302 			var l = mask.length;
6303 			var d = sluchch(l-1);
6304 			while (!mask[d].isLetter()) {
6305 				d=sluchch(l-1);
6306 			}
6307 			mask=mask.replace(mask[d],slLetter());
6308 		}
6309 		var word = genWordForMask(mask);
6310 
6311 	}
6312 	while (word.search(reg)!=-1)
6313 	return word;
6314 }
6315 
6316 function genWordForMask(mask) {
6317 /**генерирует случайное слово по маске*/
6318 	var l = mask.length;//количество символов в маске
6319 	var word = '';
6320 	for (var i=0; i<l; i++) {
6321 		switch(mask[i]) {
6322 			case '*':
6323 				var d = sluchch(3);
6324 				for (var j=0; j<d; j++)
6325 					word+=slLetter();
6326 				break;
6327 			case '?':
6328 				word+=slLetter();
6329 				break;
6330 			default:
6331 				word+=mask[i];
6332 				break;
6333 			
6334 		}
6335 	}
6336 	return word;
6337 }
6338 
6339 function genAlg() {
6340 /**Для составления цепочек/слов/бус/чисел разрешается использовать бусины k типов, обозначаемых буквами  
6341 цепочка должна состоять из N бусин
6342 0) нет правила
6343 1) На i-м месте цепочки стоит одна из бусин [список]
6344 2) На i-м месте не может стоять одна из бусин [список]
6345 3) На i-м месте цепочки стоит бусина, которой нет на j-м месте цепочки
6346 4) На i-м месте цепочки такая же бусина, как и на j-м месте цепочки
6347 5) На i-м – любая гласная, если j согласная, и любая согласная, если j гласная
6348 6) На i-м – любая гласная, если j гласная, и любая согласная, если j согласная
6349 7) На i-м месте цепочки стоит гласная/согласная буква*/
6350 	var alg=[];
6351 	if (sl1()==0)
6352 		alg.push('z');//цифры
6353 	else
6354 		alg.push('l');//буквы
6355 	var has0 = false;
6356 	var has1 = false;
6357 	var k = sluchch(4,6);
6358 	var N = sluchch(3,k-1);
6359 	alg[1]=[];
6360 	for (var i=0; i<k; i++) {
6361 		if (alg[0]=='z'){
6362 			var c = slKrome(alg[1],9);//список элементов, которые  можно использовать в цепочке
6363 			if (c%2==0)
6364 				has0=true;
6365 			else
6366 				has1=true;
6367 		}
6368 		else {
6369 			var c = slLetter(alg[1]);//список элементов, которые  можно использовать в цепочке
6370 			if (c.isGl())
6371 				has0=true;
6372 			else
6373 				has1=true;
6374 		}
6375 		alg[1].push(c);
6376 	}
6377 
6378 	for (var i=2; i<N+2; i++) {
6379 		var d=0;
6380 		if (has0 && has1)
6381 			d = sluchch(7);//номер правила, используемого для данной бусины
6382 		else
6383 			d = sluchch(4);//если есть только согласные(гласные) буква, нельзя использовать 4,5 правило
6384 		alg[i]=[];
6385 		alg[i][0]=d;
6386 		switch (d) {
6387 			case 1:
6388 			case 2:
6389 				alg[i][1]=[];
6390 				var c = sluchch(1,k-2);
6391 				for (var j=0; j<c; j++)
6392 					alg[i][1].push(slKrome(alg[i][1],k-1));//кладутся не сами буквы/цифры, а их индексы из alg[1]!
6393 				break;
6394 			case 3:
6395 			case 4:
6396 			case 5:
6397 			case 6:
6398 				if (i>2)
6399 					alg[i][1]=slKrome(i-2,i-2);
6400 				else alg[i][0]=0;
6401 				break;
6402 			case 7:
6403 				alg[i][1]=sl1();//
6404 				break;
6405 		}
6406 	}
6407 	return alg;
6408 }
6409 
6410 function algInText(alg) {
6411 /**Преобразует алгоритм в текст*/
6412 	var k = alg[1].length;
6413 	var N = (alg.length-2);
6414 	var ch = '';
6415 	var text  = 'Для составления цепочек разрешается использовать бусины '+k+' типов, обозначаемых';
6416 	if (alg[0]=='z'){
6417 		text += ' цифрами ';
6418 		ch = ['четная','нечетная'];
6419 	}
6420 	else {
6421 		text += ' буквами ';
6422 		ch = ['гласная','согласная'];
6423 	}
6424 	text += alg[1];
6425 	text += '. Цепочка должна состоять из '+N+' бусин, при этом должны соблюдаться следующие правила:';
6426 	for (var i=2; i<N+2; i++) {
6427 		if (alg[i][0]!=0) {
6428 			text = text+'<br/>';
6429 			if (i==2)
6430 				text = text+'На первом месте цепочки ';
6431 			else if (i==N+1)
6432 				text = text+'На последнем месте цепочки ';
6433 			else
6434 				text = text+'На '+(i-1)+'-м месте цепочки ';
6435 		}
6436 		switch (alg[i][0]) {
6437 			case 1:
6438 				text += 'стоит ';
6439 				if (alg[i][1].length==1)
6440 					text += 'бусина ';
6441 				else
6442 					text += 'одна из бусин ';
6443 				for (var j=0; j<alg[i][1].length; j++)
6444 					text += alg[1][alg[i][1][j]]+', ';
6445 				break;
6446 			case 2:
6447 				text += 'не может стоять ';
6448 				if (alg[i][1].length==1)
6449 					text += 'бусина ';
6450 				else
6451 					text += 'одна из бусин ';
6452 				for (var j=0; j<alg[i][1].length; j++)
6453 					text += alg[1][alg[i][1][j]]+',';
6454 				break;
6455 			case 3:
6456 				text += 'стоит бусина, которой нет на '+
6457 					(alg[i][1]+1)+'-м месте цепочки';
6458 				break;
6459 			case 4:
6460 				text += 'стоит такая же бусина, как и на '+
6461 					(alg[i][1]+1)+'-м месте цепочки';
6462 				break;
6463 			case 5:
6464 				text += 'стоит любая '+ch[0]+', если '+
6465 					(alg[i][1]+1)+'-я '+ch[1]+', и любая '+ch[1]+', если '+
6466 					(alg[i][1]+1)+'-я '+ch[0];
6467 				break;
6468 			case 6:
6469 				text += 'стоит любая '+ch[0]+', если '+
6470 					(alg[i][1]+1)+'-я '+ch[0]+', и любая '+ch[1]+', если '+
6471 					(alg[i][1]+1)+'-я '+ch[1];
6472 				break;
6473 			case 7:
6474 				text += 'стоит '+ch[alg[i][1]]+' буcина';
6475 				break;
6476 		}
6477 	}
6478 	return text;
6479 }
6480 
6481 function genWordForAlg(walg) {
6482 /**генерирует цепочку для алгоритма*/
6483 	var alg = walg.slice();
6484 	var word='';
6485 	var k = alg[1].length;
6486 	var ar0 = [];
6487 	var ar1 = [];
6488 	for (var i=0; i<k; i++){
6489 		if (alg[0]=='z'){
6490 			if (alg[1][i]%2==0)
6491 				ar0.push(alg[1][i]);
6492 			else
6493 				ar1.push(alg[1][i]);
6494 		}
6495 		else {
6496 			if (alg[1][i].isGl())
6497 				ar0.push(alg[1][i]);
6498 			else
6499 				ar1.push(alg[1][i]);
6500 		}
6501 	}
6502 	for (var i=2; i<alg.length; i++) {
6503 		switch (alg[i][0]) {
6504 			case 0:
6505 				word+=alg[1].iz();
6506 				break;
6507 			case 1:
6508 				word+=alg[1][alg[i][1].iz()];
6509 				break;
6510 			case 2:
6511 				word+=alg[1][slKrome(alg[i][1],k-1)];
6512 				break;
6513 			case 3:
6514 				word+=alg[1][slKrome(alg[1].indexOf(word[alg[i][1]]),k-1)];
6515 				break;
6516 			case 4:
6517 				word+=word[alg[i][1]];
6518 				break;
6519 			case 5:
6520 				if (alg[0]=='z'){
6521 					if (word[alg[i][1]]%2==0)
6522 						word+=ar1.iz();
6523 					else
6524 						word+=ar0.iz();
6525 				}
6526 				else {
6527 					if (word[alg[i][1]].isGl())
6528 						word+=ar1.iz();
6529 					else
6530 						word+=ar0.iz();
6531 				}
6532 				break;
6533 			case 6:
6534 				if (alg[0]=='z'){
6535 					if (word[alg[i][1]]%2==0)
6536 						word+=ar0.iz();
6537 					else
6538 						word+=ar1.iz();
6539 				}
6540 				else {
6541 					if (word[alg[i][1]].isGl())
6542 						word+=ar0.iz();
6543 					else
6544 						word+=ar1.iz();
6545 				}
6546 				break;
6547 			case 7:
6548 				if (alg[i][1])
6549 					word+=ar1.iz();
6550 				else
6551 					word+=ar0.iz();
6552 				break;
6553 		}
6554 	}
6555 	return word;
6556 }
6557 
6558 function genWrongWordForAlg(walg) {
6559 /**генерирует цепочку для алгоритма*/
6560 	var alg = walg.copyAr();
6561 	var N = (alg.length-2);
6562 	var r = 0;
6563 	do {
6564 		r = sluchch(2,N+1);
6565 	} while (alg[r][0]==0);
6566 	switch (alg[r][0]) {
6567 		case 1:
6568 			alg[r][0]=2;
6569 			break;
6570 		case 2:
6571 			alg[r][0]=1;
6572 			break;
6573 		case 3:
6574 			alg[r][0]=4;
6575 			break;
6576 		case 4:
6577 			alg[r][0]=3;
6578 			break;
6579 		case 5:
6580 			alg[r][0]=6;//
6581 			break;
6582 		case 6:
6583 			alg[r][0]=5;//
6584 			break;
6585 		case 7:
6586 			alg[r][1]=1-alg[r][1];//
6587 			break;
6588 	}
6589 	var word = '';
6590 	var word = genWordForAlg(alg);
6591 	return word;
6592 }
6593 
6594 
6595 function printLogicRus(exp,ar) {
6596 	exp=exp.replace(/\|\|/g,' ИЛИ ');
6597 	exp=exp.replace(/\&\&/g,' И ');
6598 	exp=exp.replace(/\!/g,' НЕ ');
6599 	var re = /c\[(\d)\]/g;
6600 	exp = exp.replace(re, function(str,a) { return ar[Number(a)] });
6601 	return exp;
6602 }
6603 
6604 function genPifag(){
6605 	return objUmn([[sl(1,5)]],[om.pifagtr.iz().slice()])[0];
6606 }
6607 
6608 function mapRecursive(obj,fun){
6609 	if(obj.isFunction){
6610 		return obj;
6611 	}
6612 	if(obj===undefined || obj.isNumber || obj.isString){
6613 		return fun(obj);
6614 	}
6615 	if(obj.isArray){
6616 		var len=obj.length;
6617 		var rez=[];
6618 		for(var i=0;i<len;i++){
6619 			rez[i]=mapRecursive(obj[i],fun);
6620 		}
6621 		return rez;
6622 	}
6623 	if(obj.isObject){
6624 		var rez={};
6625 		for(var chto in obj){
6626 			rez[chto]=mapRecursive(obj[chto],fun);
6627 		}
6628 		return rez;
6629 	}
6630 	return obj;
6631 }
6632 
6633 function compareObjects(a,b,propList){
6634 	var len=propList.length;
6635 	for(var i=0;i<len;i++){
6636 		if(a[propList[i]]<b[propList[i]])
6637 			return -1;
6638 		else if (a[propList[i]]>b[propList[i]])
6639 			return 1;
6640 	}
6641 	return 0;
6642 }
6643 
6644 function safeinc(obj,prop){
6645 	if(!obj[prop])
6646 		obj[prop]=1;
6647 	else
6648 		obj[prop]++;
6649 }
6650 
6651 function setProps(obj,props){
6652 	for(var chto in props){
6653 		obj[chto]=props[chto];
6654 	}
6655 }
6656 /*Функции, затрагивающие DOM, но не использующие jquery и другие внешние библиотеки*/
6657 
6658 function escapeFromIframe(){
6659 /**"Выпрыгивание" из iframe*/
6660 	if(top.location.href!=document.location.href)
6661 		top.location.href=document.location.href;
6662 }
6663 
6664 function getDocHeight(){
6665     var D = document;
6666     return Math.max(
6667         Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
6668         Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
6669         Math.max(D.body.clientHeight, D.documentElement.clientHeight)
6670     );
6671 }//Вроде как отсюда: http://james.padolsey.com/javascript/get-document-height-cross-browser/
6672 
6673 function catchTab(elem,key){
6674 	if(key.keyCode==9){
6675 		var n=elem.scrollTop;
6676 		var val=elem.value;
6677 		var sel=elem.selectionStart;
6678 		var rep=val.substr(elem.selectionStart-1,elem.selectionEnd-elem.selectionStart);
6679 		if(rep.match(/[\n\r]/)){
6680 			console.log(rep);
6681 			rep=rep.replace(/[\n](?![\n\r])/g,'\n\t');
6682 			rep=rep.replace(/[\r](?![\n\r])/g,'\r\t');
6683 			elem.value=val.substr(0,sel-1)+rep+val.substr(elem.selectionEnd-1);
6684 		}else{
6685 			elem.value=val.substr(0,sel)+'\t'+val.substr(elem.selectionEnd);
6686 			elem.selectionStart=elem.selectionEnd=sel+1;
6687 		}
6688 		elem.scrollTop=n;
6689 		return false;
6690 	}
6691 }
6692 
6693 function linkSpan(link,blank)
6694 {
6695 	if(blank)
6696 		window.open(link.replace("_","http://"));
6697 	else
6698 		self.location.replace(link.replace("_","http://"));
6699 }
6700 
6701 Object.prototype.clone=function(){
6702 /**Рекурсивно клонирует объект.*/
6703 	return clone(this);
6704 }
6705 
6706 Object.prototype.makeAllPropertiesNotEnumerable=function(){
6707 /**Сделать все свойства объекта неперечислимыми.*/
6708 	for(var chto in this)
6709 		Object.defineProperty(this, chto, {enumerable: false});
6710 }
6711 
6712 Object.prototype.cloneNonRecursive=function(){
6713 /**Нерекурсивно клонирует объект.*/
6714 	var a={};
6715 	for(var chto in this)
6716 		a[chto]=this[chto];
6717 	return a;
6718 }
6719 
6720 Object.prototype.addToGlobal=function(glname,p1){
6721 /**Добавляет все перечислимые свойства объекта в глобальную переменную и, если p1, то делает их в объекте неперечислимыми.*/
6722 	if(window[glname]===undefined)
6723 		window[glname]={};
6724 	for(var chto in this){
6725 		window[glname][chto]=this[chto];
6726 		if(p1)
6727 			Object.defineProperty(this, chto, {enumerable: false});
6728 	}
6729 	return this;
6730 }
6731 
6732 Object.prototype.importFrom=function(p1){
6733 /**Импортировать все свойства p1 в данный объект*/
6734 	if(p1)
6735 		for(var chto in p1)
6736 			this[chto]=p1[chto];
6737 }
6738 
6739 Object.prototype.NaNtoUndefined=function(r){
6740 	for(var chto in this){
6741 		if(this[chto]!==undefined && this[chto].isNumber && isNaN(this[chto])){
6742 			this[chto]=undefined;
6743 		}else if(r && this[chto].isObject){
6744 			this[chto].NaNtoUndefined();
6745 		}
6746 	}
6747 }
6748 
6749 Object.prototype.isObject=true;
6750 
6751 Object.prototype.addToGlobal('docsObject',1);
6752 Array.prototype.shuffle = function(b){
6753 /**Перемешивает массив случайным образом. Если b, то ещё и рекурсивно на один уровень.*/
6754 	var i = this.length, j, t;
6755 	while(i) 
6756 	{
6757 		j=((i--)*Math.random() ).floor();
6758 		t=b && typeof this[i].shuffle!=='undefined' ? this[i].shuffle() : this[i];
6759 		this[i]=this[j];
6760 		this[j]=t;
6761 	}
6762 	return this;
6763 };//за основу взят пример с tigir.com 
6764 
6765 Array.prototype.soed=function(){
6766 /**"Склеивает" массив в строку без разделителей*/
6767 	return this.join('');
6768 };
6769 
6770 Array.prototype.sum=function(){
6771 /**Находит сумму элементов числового массива. Если есть нечисловые элементы, они не учитываются.*/
6772 	var a=0;
6773 	var b=this.length;
6774 	for(var i=0;i<b;i++){
6775 		if((this[i]>0)||(this[i]<0)){
6776 			a+=this[i];
6777 		}
6778 	}
6779  return a;
6780 };
6781 
6782 Array.prototype.sumObj=function(){
6783 /**Находит сумму массива чисел или матриц.*/
6784 	var a=0;
6785 	var b=this.length;
6786 	for(var i=0;i<b;i++){
6787 		a=objSum(a,this[i]);
6788 	}
6789  return a;
6790 };
6791 
6792 Array.prototype.umnObj=function(){
6793 /**Находит произведение массива чисел или матриц.*/
6794 	var a=1;
6795 	var b=this.length;
6796 	for(var i=0;i<b;i++){
6797 		a=objUmn(a,this[i]);
6798 	}
6799  return a;
6800 };
6801 
6802 Array.prototype.min=function(f){
6803 /**Индекс минимального элемента числового массива. Если f, то первого, иначе последнего.*/
6804 	var i;
6805 	var m=0;
6806 	if(f){
6807 		for(i=this.length;i;i--)
6808 			if(this[i]<=this[m])
6809 				m=i;
6810 	}else
6811 		for(i=this.length;i;i--)
6812 			if(this[i]<this[m])
6813 				m=i;
6814 	return m;
6815 }
6816 
6817 Array.prototype.max=function(f){
6818 /**Индекс максимального элемента числового массива. Если f, то первого, иначе последнего.*/
6819 	var i;
6820 	var m=0;
6821 	if(f){
6822 		for(i=this.length;i;i--){
6823 			if(this[i]>=this[m]){
6824 				m=i;
6825 			}
6826 		}
6827 	}else{
6828 		for(i=this.length;i;i--){
6829 			if(this[i]>this[m]){
6830 				m=i;
6831 			}
6832 		}
6833 	}
6834 	return m;
6835 }
6836 
6837 Array.prototype.minE=function(){
6838 /**Минимальный элемент числового массива.*/
6839 	return this[this.min()];
6840 }
6841 
6842 Array.prototype.maxE=function(){
6843 /**Максимальный элемент числового массива.*/
6844 	return this[this.max()];
6845 }
6846 
6847 Array.prototype.toStandart=function(){
6848 /**Преобразует каждый элемент массива (строку или число) в строку, записанную "по стандарту".*/
6849 	var len=this.length-1;
6850 	for(;len+1;len--){
6851 		this[len]=this[len].toStandart();
6852 	}
6853 }
6854 
6855 Array.prototype.iz=function(p1){
6856 /**Если p1 опущено, возвращает случайный элемент массива, иначе последовательность p1 неповторяющихся элементов массива.*/
6857 	if(p1)
6858 		return sluchiz(this,p1);
6859 	else
6860 		return this[sl(0,this.length-1)];
6861 }
6862 
6863 Array.prototype.tr=function(p1,p2){
6864 /**Возвращает строку таблицы с записанными в неё элементами массива.
6865 	p1 и p2 позволяют выбрать тэги, отличные от td и tr соотв.*/
6866 	var len=this.length-1;
6867 	var str='';
6868 	for(;len+1;len--){
6869 		str=this[len].vTag(p1?p1:'td')+str;
6870 	}
6871 	return str.vTag(p2?p2:'tr');
6872 }
6873 
6874 Array.prototype.zapslch=function(m,n,p1,p2,p3){
6875 /**Присваивает элементам с m по n случайные значения от p1 до p2 с шагом генерации p3. p2 и p3 можно опускать, как в sluchch()*/
6876 	for(;m<=n;m++)
6877 		this[m]=sluchch(p1,p2,p3);
6878 	return this;
6879 }
6880 
6881 Array.prototype.N=function(p1,p2){
6882 /**Присваивает p1 первым элементам массива значения натурального ряда, умноженные на p2, если p2 не ноль*/
6883 	for(var i=0;i<p1;this[i++]=(p2?i*p2:i)){};
6884 	this.length=p1;
6885 	return this;
6886 }
6887 
6888 Array.prototype.sluchiz=function(n){
6889 /**Возвращает массив из p1 неповторяющихся элементов массива.*/
6890 	return sluchiz(this,n);
6891 }
6892 
6893 Array.prototype.malRazn=function(n,s,p){
6894 /**Заполняет массив значениями, каждое из к-рых отличается от предыдущего не более, чем на s*p, и притом с шагом дискретизации s
6895  n - сколько элементов добавляем
6896  s - шаг изменения
6897  p - максимальное количество шагов изменения (в обе стороны)
6898 */
6899 	for(var i=1;i<=n;i++)
6900 		this[i]=this[i-1]+s*sluchch(-p,p);
6901 	return this;
6902 }
6903 
6904 Array.prototype.pervSovp=function(p1){
6905 /**Возвращает индекс первого элемента, совпавшего с данным, и -1, если таких элементов нет*/
6906 	for(var i=0;i<this.length;i++)
6907 		if(this[i]==p1)
6908 			return i;
6909 	return -1;
6910 }
6911 
6912 Array.prototype.poslSovp=function(p1){
6913 /**Возвращает индекс последнего элемента, совпавшего с данным, и -1, если таких элементов нет*/
6914 	for(var i=this.length-1;i>=0;i--)
6915 		if(this[i]==p1)
6916 			return i;
6917 	return -1;
6918 }
6919 
6920 Array.prototype.sovp=function(p1){
6921 /**Возвращает количество элементов, совпавших с данным, и 0, если таких элементов нет*/
6922 	var s=0;
6923 	for(var i=this.length-1;i>=0;i--)
6924 		if(this[i]==p1)
6925 			s++;
6926 	return s;
6927 }
6928 
6929 Array.prototype.toFixedLess=function(p1){
6930 /**Возвращает массив, в котором каждый элемент - строка, содержащая соттв. элемент данного, округлённый до p1 цифр после запятой*/
6931 	var a=[];
6932 	var len=this.length;
6933 	for(var i=0;i<len;i++)
6934 		a[i]=this[i].toFixedLess(p1);
6935 	return a;
6936 }
6937 
6938 Array.prototype.dopFixedLess=function(p1){
6939 /**Дополняет массив элементами, округлёнными до p1 цифр после запятой и представленными в виде строк*/
6940 	var len=this.length;
6941 	for(var i=0;i<len;i++)
6942 		this[i]=[this[i],this[i].toFixedLess(p1)];
6943 	return this;
6944 }
6945 
6946 Array.prototype.T=function(){
6947 /**Возвращает транспонированный массив*/
6948 	var l1=this.length;
6949 	var l2=0;
6950 	for(var i=0;i<l1;i++)
6951 		if(this[i].length>l2)
6952 			l2=this[i].length;
6953 	var a=[];
6954 	for(i=0;i<l2;i++)
6955 		a[i]=[];
6956 	for(i=0;i<l1;i++)
6957 		for(var j=0;j<l2;j++)
6958 			a[j][i]=this[i][j];
6959 	return a;
6960 }
6961 
6962 Array.prototype.zapMonot=function(n,a,minD,maxD,shag){
6963 /**Заполняет массив монотонно возрастающими или убывающими числами.
6964 a - нулевой (начальный) элемент массива.
6965 n - количество элементов
6966 Каждый следующий элемент массива отличается от предыдущего не менее, чем на minD и не более, чем maxD, с шагом shag*/
6967 	this[0]=a;
6968 	for(var i=1;i<n;i++)
6969 		this[i]=this[i-1]+sluchch(minD,maxD,shag);
6970 	return this;
6971 }
6972 
6973 Array.prototype.udFunc=function(f1){
6974 /**Количество элементов, удовлетворяющих в качестве параметра функции, возвращающей 0 или 1. Дикий костыль.*/
6975 	return this.map(f1).sum();
6976 }
6977 
6978 Array.prototype.kolvoMzhd=function(min,max,vkl){
6979 /**Возвращает кол-во чисел в массиве, лежащих между min и max, если vkl, то включительно*/
6980 	return this.udFunc(function(p1){
6981 		return vkl?p1>=min&&p1<=max:p1>min&&p1<max;
6982 	});
6983 }
6984 
6985 Array.prototype.isArray=true;
6986 
6987 Array.prototype.mn_plus=function(p1){
6988 /**Прибавляет к массиву коэффициентов многочлена, записанных по возрастанию степеней, другой такой массив.
6989 Текущий массив не изменяет!
6990 */
6991 	var b=this.slice()
6992 	if(p1.isNumber){
6993 		b[0]+=p1;
6994 		return b;
6995 	}
6996 	if(!p1.isArray)
6997 		return this;
6998 	if(p1.length>this.length)
6999 		return p1.mn_plus(this);
7000 
7001 	var len=p1.length;
7002 	for(var i=0; i<len;i++)
7003 		b[i]+=p1[i];
7004 	return b;
7005 }
7006 
7007 Array.prototype.mn_umn=function(p1){
7008 /**Умножает массив коэффициентов многочлена, записанных по возрастанию степеней, на другой такой массив.
7009 Текущий массив не изменяет!
7010 */
7011 	var b=this.slice()
7012 	if(p1.isNumber){
7013 		return this.map(function(p2){return p1*p2;});
7014 	}
7015 	if(!p1.isArray){
7016 		return this;
7017 	}
7018 	if(p1.length>this.length){
7019 		return p1.mn_umn(this);
7020 	}
7021 	var c=p1.slice()
7022 	var d=[];
7023 	var len=p1.length;
7024 	for(var i=0; i<len;i++){
7025 		d=d.mn_plus(b.mn_umn(p1[i]));
7026 		b.unshift(0);
7027 	}
7028 	return d;
7029 }
7030 
7031 Array.prototype.slag=function(){
7032 /**Перемешивает массив в случайном порядке и радостно соединяет плюсиками.*/
7033 	return this.shuffle().join('+');
7034 }
7035 
7036 Array.prototype.addPrefix=function(p1){
7037 /**Добавляет к каждому элементы массива префикс p1.
7038 Текущий массив не изменяет!*/
7039 	return this.map(function(p2){return p1+p2;});
7040 }
7041 
7042 Array.prototype.toSum=function(a){
7043 /**Возвращает массив, элементы которого пропорциональны элементам данного, но их сумма равна a или 1, если a не указано*/
7044 	if(a==undefined)
7045 		a=1;
7046 	var s=this.sum();
7047 	return this.map(function(p1){return a*p1/s});
7048 }
7049 
7050 Array.prototype.sumPyram=function(){
7051 /**Присваивает каждому элементу массива значение суммы всех предыдущих*/
7052 	for(var i=1;i<this.length;i++)
7053 		this[i]+=this[i-1];
7054 	return this;
7055 }
7056 
7057 Array.prototype.sVeroyatn=function(){
7058 /**Возвращает номер элемента массива с вероятностью, пропорциональной значению элемента*/
7059 	var th=this.toSum().sumPyram();
7060 	var a=Math.random();
7061 	var i;
7062 	for(i=0; a>th[i] && i<th.length ;i++){};
7063 	return i;
7064 }
7065 
7066 Array.prototype.hasElem=function(a){
7067 /**Определяет, есть ли в массиве заданный элемент*/
7068 	return this.some(function(p1){
7069 		return p1==a;
7070 	});
7071 }
7072 
7073 Array.prototype.hasElemStrict=function(a){
7074 /**Определяет, есть ли в массиве заданный элемент - строго, с точностью до совпадения типов*/
7075 	return this.some(function(p1){
7076 		return p1===a;
7077 	});
7078 }
7079 
7080 Array.prototype.matrToVect=function(n){
7081 /**Раскладывает m-мерный массив в (m-n)-мерный. Если n не указано, то принимается равным 1.*/
7082 	if(n>1)
7083 		return this.matrToVect(n-1).matrToVect();
7084 	else{
7085 		var rez=[];
7086 		var len=this.length;
7087 		for(var i=0;i<len;i++){
7088 			rez=rez.concat(this[i]);
7089 		}
7090 		return rez;
7091 	}
7092 }
7093 
7094 Array.prototype.ob$=function(){
7095 /**Возвращает массив, в котором элементы данного приведены к строкам и окружены символами $ (начало или конец формулы)*/
7096 	return this.map(function(p1){
7097 		return (''+p1).ob$();
7098 	});
7099 }
7100 
7101 Array.prototype.sortDelDubl=function(p1){
7102 /**Отсортировать копию массива по функции p1 (может быть опущена) и удалить дублирующиеся элементы*/
7103 	if(this===[])
7104 		return [];
7105 	var a=this.slice().sort(p1);
7106 	for(var i=0;i<a.length;i++)
7107 		if(a[i]==a[i+1])
7108 			a.splice(i--,1);
7109 	return a;
7110 }
7111 
7112 Array.prototype.hasDubl=function(){
7113 /**Есть ли в массиве дублирующиеся элементы*/
7114 	if(this===[])
7115 		return 0;
7116 	var a=this.slice().sort();
7117 	for(var i=0;i<a.length;i++)
7118 		if(a[i]==a[i+1])
7119 			return 1;
7120 	return 0;
7121 }
7122 
7123 Array.prototype.matrixToTex=function(){
7124 /**Возвращает строку - представление массива как матрицы в TeX-нотации.*/
7125 	if(this==[])
7126 		return '';
7127 	return '\\begin{array}{c}'+
7128 		this.map(function(p1){
7129 			return p1.isArray?
7130 				p1.join(' & '):
7131 				p1;
7132 		}).join('\\\\')+
7133 		'\\end{array}';
7134 }
7135 
7136 Array.prototype.det=function(){
7137 /**Функция-обёртка. Возвращает определитель матрицы.*/
7138 	return Determinant(this);
7139 }
7140 
7141 Array.prototype.inv=function(){
7142 /**Функция-обёртка. Возвращает обратную матрицу.*/
7143 	return InverseMatrix(this);
7144 }
7145 
7146 Array.prototype.allStrToNum=function(){
7147 /**Все строки, встречающиеся в массиве, превратить в числа (если получится).
7148 Исходный массив не изменяет.*/
7149 	return this.slice().map(function(elem){
7150 		if(elem.isNumber)
7151 			return elem;
7152 		if(elem.isArray)
7153 			return elem.allStrToNum();
7154 		if(elem.isString)
7155 			return elem.toNumberExt();
7156 		return 0;
7157 	});
7158 }
7159 
7160 Array.prototype.isLNez=function(){
7161 /**Является ли система строк матрицы линейно независимой.*/
7162 	var len=this.length;
7163 	if(len<this[0].length){
7164 		return this.T().isLNez();
7165 	}
7166 	if(len==this[0].length){
7167 		return !!this.det();
7168 	}
7169 	for(var i=0;i<len;i++){
7170 		var buf=this.slice();
7171 		buf.splice(i,1);
7172 		if(buf.isLNez())
7173 			return 1;
7174 	}
7175 	return 0;
7176 }
7177 
7178 Array.prototype.testSLU=function(a,b,tochnost){
7179 /**Является ли данный вектор решением СЛУ с матрицей a и столбцом свободных членов b
7180 с точностью tochnost (всё-таки с float-ами фактически работаем).*/
7181 	if(tochnost===undefined){
7182 		tochnost=1e-5;
7183 	}
7184 	var len=a.length;
7185 	if(!b){
7186 		b=generateMatrix(len,1,0,0);
7187 	}
7188 
7189 	b=b.allStrToNum();
7190 	a=a.allStrToNum();
7191 
7192 	for(var i=0;i<len;i++){
7193 		if( Math.abs( objUmn( [a[i]], this )[0][0]
7194 			- b[i][0] ) > tochnost ){
7195 			return 0;
7196 		}
7197 	}
7198 	return 1;
7199 }
7200 
7201 Array.prototype.rk=function(){
7202 /**Ранг матрицы. Функция-обёртка над rang_mat*/
7203 	return rang_mat(this);
7204 }
7205 
7206 Array.prototype.isFSR=function(a){
7207 /**Является ли данная матрица, в которой векторы - столбцы, ФСР для СЛОУ с матрицей a.*/
7208 	var t=this.T();
7209 	var len=t.length;
7210 
7211 	a=a.allStrToNum();
7212 	t=t.allStrToNum();
7213 
7214 	if(!t.isLNez())
7215 		return 0;
7216 	if(a[0].length-a.rk() != len)
7217 		return 0;
7218 
7219 	for(var i=0;i<len;i++){
7220 		if(![t[i]].T().testSLU(a))
7221 			return 0;
7222 	}
7223 	return 1;
7224 }
7225 
7226 Array.prototype.isNullVect=function(){
7227 /**Является ли вектор нулевым*/
7228 	var len=this.length;
7229 	for(var i=0;i<len;i++)
7230 		if(this[i])
7231 			return 0;
7232 	return 1;
7233 }
7234 
7235 Array.prototype.hasNullVect=function(){
7236 /**Есть ли в матрице нулевые векторы - строки или столбцы?*/	
7237 	var len=this.length;
7238 	for(var i=0;i<len;i++)
7239 		if(this[i].isNullVect())
7240 			return 1;
7241 	var th=this.T();
7242 	len=th.length;
7243 	for(var i=0;i<len;i++)
7244 		if(th[i].isNullVect())
7245 			return 1;
7246 	return 0;
7247 }
7248 
7249 Array.prototype.copyAr=function() {
7250 /**Если массив содержит вложенные, slice не подходит*/
7251 	var ar = [];
7252 	for (var i=0; i<this.length; i++){
7253 		if (Array.isArray(this[i])){
7254 			ar[i] = this[i].copyAr();
7255 		}
7256 		else {
7257 			ar[i] = this[i];
7258 		}
7259 	}
7260 	return ar;
7261 }
7262 
7263 Array.prototype.equalAr=function(x1) {
7264 /**Возвращает, равны ли this и x1*/
7265 	var f=true;
7266 	if (x1.length==this.length){
7267 		var i=0;
7268 		while (i<x1.length && f) {
7269 			f=f&&(x1[i]==this[i]);
7270 			i++;
7271 		}
7272 		return(f);
7273 	}
7274 	else return false;
7275 }
7276 
7277 Array.prototype.reverseElems=function(recursive){
7278 	return this.map(function(p1){
7279 		return recursive && p1.reverseElems ? p1.reverseElems(1) : p1.reverse();
7280 	});
7281 }
7282 
7283 Array.prototype.hasCommon=function(arr){
7284 /**Имеет ли данный массив и arr общие элементы?*/
7285 	var len=arr.length;
7286 	for(var i=0; i<len; i++)
7287 		if(this.hasElem(arr[i]))
7288 			return 1;
7289 		return 0;
7290 }
7291 
7292 Array.prototype.delEmpty=function(){
7293 /**Удалить из массива пустые строки и undefined*/
7294 	var len=this.length;
7295 	for(var i=0;i<len;i++){
7296 		if(this[i]===undefined || this[i]==""){
7297 			this.splice(i,1);
7298 			len--;
7299 			i--;
7300 		}
7301 	}
7302 }
7303 
7304 Array.prototype.trimStrings=function(){
7305 /**Для каждой строки-элемента массива вызвать .trim()*/
7306 	var len=this.length;
7307 	for(var i=0;i<len;i++){
7308 		this[i]=this[i].trim();
7309 	}
7310 }
7311 
7312 Array.prototype.replaceStrings=function(p1,p2){
7313 /**Для каждой строки-элемента массива вызвать .replace(p1,p2)*/
7314 	var len=this.length;
7315 	for(var i=0;i<len;i++){
7316 		this[i]=this[i].replace(p1,p2);
7317 	}
7318 }
7319 
7320 Array.prototype.delDublByProp=function(prop){
7321 /**Удаление элементов массива, у которых свойства из массива строк prop совпадают с ранее рассмотренными.*/
7322 	var rez=this.slice();
7323 	rez=rez.sortBy(prop);
7324 	var len=rez.length;
7325 	var p=prop.length;
7326 	for(var i=1;i<len;i++){
7327 		if(!compareObjects(rez[i-1],rez[i],prop)){
7328 			rez.splice(i,1);
7329 			len--;
7330 			i--;
7331 		}
7332 	}
7333 	return rez;
7334 }
7335 
7336 Array.prototype.sortNumeric=function(){
7337 /**Сортировка численного массива.*/
7338 	return this.sort(function(a,b){
7339 		return a-b;
7340 	});
7341 }
7342 
7343 Array.prototype.sortNumericArr=function(){
7344 /**Сортировка массива числовых массивов по первому элементу.*/
7345 	return this.sort(function(a,b){
7346 		return a[0]-b[0];
7347 	});
7348 }
7349 
7350 Array.prototype.sortBy=function(prop){
7351 /**Сортировка элементов массива по списку свойств prop, где prop - массив строк.*/
7352 	return this.sort(function(a,b){
7353 		return compareObjects(a,b,prop);
7354 	});
7355 	
7356 }
7357 
7358 Array.prototype.getVariety=function(prop){
7359 /**Возвращает массив значений выбранного свойства элементов-объектов исходного массива.*/
7360 	var len=this.length;
7361 	var rez=[];
7362 	for(var i=0;i<len;i++){
7363 		if(this[i][prop]!==undefined){
7364 			if(this[i][prop].isArray){
7365 				rez=rez.concat(this[i][prop]);
7366 			}else{
7367 				rez.push(this[i][prop]);
7368 			}
7369 		}
7370 	}
7371 	return rez.sortDelDubl();
7372 }
7373 
7374 Array.prototype.addToGlobal('docsArray',1);
7375 
7376 Array.prototype.mt_prov=function(kolvo){
7377 /**Проверяет, можно ли трактовать каждый элемент массива как точку, т. е.
7378 у каждого ли элемента массива есть свойства x и y,
7379 и, если kolvo, то есть ли в данном массиве kolvo точек.*/
7380 	if(this.length<kolvo)
7381 		return 0;
7382 	var fl=true;
7383 	var len=this.length-1;
7384 	for(;(len+1) && fl;len--)
7385 		fl=fl&&(this[len].x!=undefined)&&(this[len].y!=undefined);
7386 	return fl;
7387 };
7388 
7389 Array.prototype.mt_s3ug=function(){
7390 /**Площадь треугольника, вершины которого - первые три элемента массива точек.*/
7391 	if(!this.mt_prov(3))
7392 		return 0;
7393 	return 0.5*(this[0].x*this[1].y+this[0].y*this[2].x+this[1].x*this[2].y-this[1].y*this[2].x-this[2].y*this[0].x-this[0].y*this[1].x).abs();
7394 };
7395 
7396 Array.prototype.mt_tgUnakl=function(){
7397 /**Возвращает тангенс угла наклона прямой, проходящей через две первые точки массива.*/
7398 	if(!this.mt_prov(2))
7399 		return undefined;
7400 	if(!(this[0].y-this[1].y))
7401 		return 0;
7402 	return (this[0].y-this[1].y)/(this[0].x-this[1].x);
7403 }
7404 
7405 Array.prototype.mt_is3ug=function(){
7406 /**Проверяет, образуют ли три данные точки треугольник. 
7407 Можно использовать и для того, чтобы выяснить, лежат ли три данные точки на одной прямой.*/
7408 	if(!this.mt_prov(3))
7409 		return 0;
7410 	return this.mt_tgUnakl()!=[this[1],this[2]].mt_tgUnakl();
7411 };
7412 
7413 Array.prototype.mt_uPeres=function(){
7414 /**Угол пересечения прямых, проходящих через первые две пары точек.*/
7415 	if(!this.mt_prov(4))
7416 		return 0;
7417 	var u=(this.mt_tgUnakl().atan()-[this[2],this[3]].mt_tgUnakl().atan()).abs();
7418 	for(;u>=Math.PI;u=u-Math.PI){};
7419 	for(;u>Math.PI/2;u=Math.PI-u){};
7420 	return u;
7421 };
7422 
7423 Array.prototype.mt_isMnug=function(p1){
7424 /**Проверяет, задаёт ли массив точек p1-угольник.
7425 При вызове без параметра - многоугольник.*/
7426 	if(
7427 			(p1!=undefined)&&(this.length!=p1)
7428 		||	(!this.mt_prov(3))
7429 		||	(this.mt_dubli())
7430 		||	(this.mt_estSamoper())
7431 		){
7432 			return 0;
7433 	}
7434 	
7435 	var len=this.length-1;
7436 	var fl=1;
7437 	
7438 	fl*=[this[0],this[len],this[len-1]].mt_is3ug();
7439 	fl*=[this[0],this[1],this[len]].mt_is3ug();
7440 	for(;len-1;len--)
7441 		fl*=[this[len],this[len-1],this[len-2]].mt_is3ug();
7442 
7443 	return fl;
7444 };
7445 
7446 Array.prototype.mt_rasst=function(){
7447 /**Расстояние между двумя первыми точками массива.*/
7448 	if(!this.mt_prov(2))
7449 		return undefined;
7450 	return ((this[0].x-this[1].x).pow(2)+(this[0].y-this[1].y).pow(2)).sqrt();
7451 };
7452 
7453 Array.prototype.mt_s4ug=function(){
7454 /**Площадь четырёхугольника.*/
7455 	if(!this.mt_isMnug(4))
7456 		return undefined;
7457 	return 0.5*[this[0],this[2]].mt_rasst()*[this[1],this[3]].mt_rasst()*
7458 		[this[0],this[2],this[1],this[3]].mt_uPeres().sin();
7459 };
7460 
7461 Array.prototype.mt_dubli=function(){
7462 /**Есть ли в массиве повторяющиеся точки*/
7463 	if(!this.mt_prov())
7464 		return undefined;
7465 	var len;
7466 	var l2;
7467 	for(len=this.length-1;len+1;len--)
7468 		for(l2=this.length-1;l2>len;l2--)
7469 			if(this[len].x==this[l2].x&&this[len].y==this[l2].y)
7470 				return 1;
7471 	return 0;
7472 };
7473 
7474 Array.prototype.mt_pryam=function(){
7475 /**Возвращает коэффициенты a и b прямой y=ax+b, проходящей через две первые точки.*/
7476 	if(!this.mt_prov(2))
7477 		return undefined;
7478 	var a=this.mt_tgUnakl();
7479 	if(a.abs()==Infinity)
7480 		var b=this[0].x;
7481 	else
7482 		var b=this[0].y-a*this[0].x;
7483 	return {a:a,b:b};
7484 };
7485 
7486 Array.prototype.mt_join=function(p1){
7487 /**Возращает строку - координаты точек через запятую.*/
7488 	if(!this.mt_prov())
7489 		return undefined;
7490 	if(!p1)
7491 		p1=', ';
7492 	var p2='';
7493 	var len=this.length-1;
7494 	for(var l2=0;l2<len;l2++)
7495 		p2+='('+this[l2].x+'; '+this[l2].y+')'+p1;
7496 	p2+='('+this[l2].x+'; '+this[l2].y+')';
7497 	return p2;
7498 }
7499 
7500 Array.prototype.mt_otrPeres=function(){
7501 /**Количество точек пересечения двух отрезков, задаваемых первыми парами точек.*/
7502 	if(!this.mt_prov())
7503 		return undefined;
7504 	var p1=[[this[0],this[1]].mt_pryam(),[this[2],this[3]].mt_pryam()].mp_tPeres();
7505 	if(p1.x==Infinity)
7506 		return Infinity;
7507 	else if(p1.x.mzhd(this[0].x,this[1].x,1)&&p1.x.mzhd(this[2].x,this[3].x,1)&&p1.y.mzhd(this[0].y,this[1].y,1)&&p1.y.mzhd(this[2].y,this[3].y,1))
7508 		return 1;
7509 	return 0;
7510 }
7511 
7512 Array.prototype.mt_estSamoper=function(){
7513 /**Имеет ли ломанная, образованная точками, самопересечения.*/	
7514 	if(!this.mt_prov(3))
7515 		return undefined;
7516 	var len=this.length;
7517 	var th=this.concat(this,this);
7518 	var fl=0;
7519 	for(var l1=0;l1<len;l1++)
7520 		for(var l2=l1+2;l2<=l1+len-2;l2++)
7521 			fl+=[th[l1],th[l1+1],th[l2],th[l2+1]].mt_otrPeres();
7522 	return fl;
7523 }
7524 
7525 Array.prototype.mt_ladMnug=function(){
7526 /**Перемешивать точки до тех пор, пока не получится многоугольник.*/
7527 	if(		(!this.mt_prov(3))
7528 		||	(this.mt_dubli())
7529 	)
7530 		return 0;
7531 	
7532 	for(;!this.mt_isMnug();this.shuffle()){};
7533 	//Крайне криво, но думать лень.
7534 	return this;
7535 }
7536 
7537 Array.prototype.mt_perpend=function(){
7538 /**Перпендикулярны ли прямые, задаваемые первыми двумя парами точек.*/
7539 	return (this.mt_uPeres()==Math.PI/2);
7540 }
7541 
7542 Array.prototype.mt_paral=function(){
7543 /**Параллельны ли прямые, задаваемые первыми двумя парами точек.*/
7544 	return this.mt_uPeres()==0;
7545 }
7546 
7547 Array.prototype.mt_imen4ug=function(){
7548 /**Называет четырёхугольник.*/
7549 	if(!this.mt_isMnug(4)){return 0;};
7550 	var A=this[0];
7551 	var B=this[1];
7552 	var C=this[2];
7553 	var D=this[3];
7554 	var prug=	([A,B,B,C].mt_perpend())&&
7555 				([B,C,C,D].mt_perpend())&&
7556 				([A,D,D,C].mt_perpend());
7557 	var rstor=	([A,B].mt_rasst()==[A,D].mt_rasst())*
7558 				([C,B].mt_rasst()==[C,D].mt_rasst())+
7559 				([B,A].mt_rasst()==[B,C].mt_rasst())*
7560 				([D,A].mt_rasst()==[D,C].mt_rasst());
7561 	var paral=	([A,B,C,D].mt_paral())+
7562 				([A,D,B,C].mt_paral());
7563 	if(prug&&(rstor==2))
7564 		return lx['квадрат'];
7565 	else if(prug)
7566 		return lx['прямоугольник'];
7567 	else if(rstor==2)
7568 		return lx['ромб'];
7569 	else if(paral==2)
7570 		return lx['параллелограмм'];
7571 	else if(paral==1)
7572 		return lx['трапеция'];
7573 	else if(rstor==1)
7574 		return lx['дельтоид'];
7575 	else
7576 		return lx['четырёхугольник'];
7577 };
7578 
7579 Array.prototype.addToGlobal('docsArray',1);
7580 
7581 Array.prototype.mp_prov=function(){
7582 /**Проверяет, можно ли трактовать массив как массив прямых, 
7583 т. е. у каждого ли элемента массива есть свойства a и b*/
7584 	var fl=true;
7585 	var len=this.length-1;
7586 	for(;(len+1)&&fl;len--)
7587 		fl=fl&&(this[len].a!=undefined)&&(this[len].b!=undefined);
7588 	return fl;
7589 }
7590 
7591 Array.prototype.mp_tPeres=function(){
7592 /**Находит точку пересечения первых двух прямых.*/
7593 	if(!this.mp_prov())
7594 		return undefined;
7595 	
7596 	var x;
7597 	var y;
7598 	if(this[0].a.abs()==Infinity){
7599 		x=this[0].b;
7600 		y=this[1].a*x+this[1].b;
7601 	}else if(this[1].a.abs()==Infinity){
7602 		x=this[1].b;
7603 		y=this[0].a*x+this[0].b;
7604 	}else{
7605 		var c=this[1].a-this[0].a;
7606 		if(c==0)
7607 			if(this[0].b==this[1].b)
7608 				x=y=Infinity;
7609 			else
7610 				x=y=NaN;
7611 		else{
7612 			x=(this[0].b-this[1].b)/(this[1].a-this[0].a);
7613 			y=this[0].a*x+this[0].b;
7614 		}
7615 	}	
7616 	return {x:x,y:y};
7617 }
7618 
7619 Array.prototype.addToGlobal('docsArray',1);
7620 Array.prototype.mn_proizv=function(){
7621 /**Находит производную от многочлена, коэфф. которого в порядке возрастания степеней - элементы данного массива.*/
7622 	var len=this.length;
7623 	var th=[];
7624 	for(var i=0;i<len-1;i++){
7625 		th[i]=clone(this[i+1]);
7626 		th[i]=Drob.fixN(th[i]);
7627 		th[i].ch=th[i].ch*(i+1);
7628 		Drob.sokr(th[i]);
7629 	}
7630 	return th;
7631 }
7632 
7633 Array.prototype.mn_vychisl=function(x){
7634 /**Находит значение многочлена, коэфф. которого в порядке возрастания степеней - элементы данного массива,
7635 при значении переменной, равном x*/
7636 	var len=this.length;
7637 	var s=0;
7638 	for(var i=0;i<len;i++){
7639 		this[i]=Drob.fixN(this[i]);
7640 		s+=this[i].ch*x.pow(i)/this[i].zn;
7641 	}
7642 	return s;
7643 }
7644 
7645 Array.prototype.mn_txt=function(x){
7646 /**TeX-представление многочлена, коэфф. которого в порядке возрастания степеней - элементы данного массива, x - символ переменной.*/
7647 	var len=this.length;
7648 	this[0]=Drob.fixN(this[0]);
7649 	var s=this[0].ch.frac(this[0].zn).esli(this[0].ch);
7650 	for(var i=1;i<len;i++){
7651 		this[i]=Drob.fixN(this[i]);
7652 		if(this[i].ch){
7653 			s= this[i].ch.frac(this[i].zn)+x+('^{'+i+'}').esli(i!=1)
7654 				+'+'+s;
7655 		}
7656 	}
7657 	return s.plusminus();
7658 }
7659 
7660 Array.prototype.mn_pervoobr=function(){
7661 /**Находит первообразную (C=0) от многочлена, коэфф. которого в порядке возрастания степеней - элементы данного массива.*/
7662 	var len=this.length;
7663 	var th=[0];
7664 	for(var i=1;i<len+1;i++){
7665 		th[i]=clone(this[i-1]);
7666 		th[i]=Drob.fixN(th[i]);
7667 		th[i].zn=th[i].zn*i;
7668 		Drob.sokr(th[i]);
7669 	}
7670 	return th;
7671 }
7672 
7673 Array.prototype.mn_txtmas=function(x){
7674 /**TeX-представление многочлена, коэфф. которого в порядке возрастания степеней - элементы данного массива, x - символ переменной, в виде массива выражений*/
7675 	var len=this.length;
7676 	this[0]=Drob.fixN(this[0]);
7677 	var s=[this[0].ch.frac(this[0].zn).esli(this[0].ch)];
7678 	for(var i=1;i<len;i++){
7679 		this[i]=Drob.fixN(this[i]);
7680 		if(this[i].ch){
7681 			s.push(this[i].ch.frac(this[i].zn)+x+('^{'+i+'}').esli(i!=1));
7682 		}
7683 	}
7684 	return s;
7685 }
7686 
7687 Array.prototype.addToGlobal('docsArray',1);
7688 
7689 Array.prototype.pe_inv=function(){
7690 /**Количество инверсий в перестановке, образованной элементами массива.*/
7691 	var perest=0;
7692 	var len=this.length;
7693 	for(var i=0;i<len;i++)
7694 		for(var j=i;j<len;j++)
7695 			if(this[i]>this[j])
7696 				perest++;
7697 	return perest;
7698 }
7699 
7700 Array.prototype.pe_txt=function(){
7701 /**Перестановка, образованная элементами массива, в TeX-нотации.*/
7702 	return "$\\left("+this.join(";")+"\\right)$";
7703 }
7704 
7705 Array.prototype.addToGlobal('docsArray',1);
7706 
7707 CanvasRenderingContext2D.prototype.drawLine=function(x1,y1,x2,y2){
7708 	this.beginPath();
7709 	this.moveTo(x1,y1);
7710 	this.lineTo(x2,y2);
7711 	this.stroke();
7712 	this.closePath();
7713 }
7714 
7715 CanvasRenderingContext2D.prototype.setka=function(s,n){
7716 	for(var i=-n;i<=n;i++){
7717 		this.drawLine(-s*n,s*i,s*n,s*i);
7718 		this.drawLine(s*i,-s*n,s*i,s*n);
7719 	}
7720 }
7721 
7722 CanvasRenderingContext2D.prototype.setkaXY=function(s,n1,n2,n3,n4){
7723 	for(var i=n1;i<=n2;i++){
7724 		this.drawLine(s*i,s*n3,s*i,s*n4);
7725 	}
7726 	for(i=n3;i<=n4;i++){
7727 		this.drawLine(s*n1,s*i,s*n2,s*i);
7728 	}
7729 }
7730 
7731 CanvasRenderingContext2D.prototype.fillKrug=function(x,y,r){
7732 	this.beginPath();
7733 	this.arc(x,y, r, 0, 2*Math.PI, false);
7734 	this.fill();
7735 }
7736 
7737 CanvasRenderingContext2D.prototype.drawLineSpec=function(x1,y1,x2,y2){
7738 	var m = (x1-x2);
7739 	var n = (y1-y2);
7740 	var k = (n/m);
7741 
7742 	if(x1==x2){
7743 		for(var iy = Math.min(y1,y2); iy < Math.max(y1,y2); iy += 14){
7744 			this.drawLine(x1,iy,x1,iy+7);
7745 		}
7746 	}
7747 
7748 	if(y1==y2){
7749 		for(var ix = Math.min(x1,x2); ix < Math.max(x1,x2); ix += 14){
7750 			this.drawLine(ix, y1, ix+7, y1);
7751 		}
7752 	}
7753 
7754 	if((x2>x1)&(y2>y1)){
7755 		for (var ix=x1+7; ix<x2; ix+=14){
7756 			this.drawLine(ix, y1+ix-x1, ix+7, y1+ix-x1+7);
7757 		}
7758 	}
7759 
7760 	if((x2>x1)&(y2<y1)){
7761 		for (var ix=x1+7; ix<x2; ix+=14){
7762 			this.drawLine(ix, y1-ix-x1, ix+7, y1-ix-x1-7);
7763 		}
7764 	}
7765 
7766 	if((x2<x1)&(y2<y1)){
7767 		for (var ix=x2+7; ix<x1; ix+=14){
7768 			this.drawLine(ix, y2+ix-x2, ix+7, y2+ix-x2+7);
7769 		}
7770 	}
7771 
7772 	if((x2<x1)&(y2>y1)){
7773 		for (var ix=x2+7; ix<x1; ix+=14){
7774 			this.drawLine(ix, y2-ix+x2, ix+7, y2-ix+x2-7);
7775 		}
7776 	}
7777 }
7778 
7779 CanvasRenderingContext2D.prototype.isCanvasRenderingContext2D=true;
7780 
7781 /*Иначе огнелисичка матюкается
7782 var docsCanvas;
7783 if(!docsCanvas)
7784 	docsCanvas={};
7785 
7786 for(var chto in CanvasRenderingContext2D.prototype){
7787 	docsCanvas[chto]=CanvasRenderingContext2D.prototype[chto];
7788 //	Object.defineProperty(CanvasRenderingContext2D.prototype, chto, { enumerable: false });
7789 }*/
7790 Number.prototype.toFixedLess=function(n){
7791 /**Возвращает строку - предсиавление числа с не более чем n знаками после запятой.*/
7792 	var a=this.toFixed(n);
7793 	for(;a.posl()=='0'&&a.search(/[.]/)!=-1;a=a.udalPosl()){};
7794 	for(;a.posl()=='.';a=a.udalPosl()){};
7795 	return a;
7796 }
7797 
7798 Number.prototype.pm=function(){
7799 /**Случайным образом возвращает число или ему противоположное.*/
7800 	return sl1()?this:-this;
7801 }
7802 
7803 Number.prototype.dopdo=function(c,n){
7804 /**Возвращает строковое представление числа, дополненное спереди строками c до длины не менее n*/
7805 		return (''+this).dopdo(c,n);
7806 }
7807 
7808 Number.prototype.isZ=function(){
7809 /**Проверяет, является ли число целым.*/
7810 	return this-this.floor()==0;
7811 }
7812 
7813 Number.prototype.isPolnKvadr=function(){
7814 /**Проверяет, является ли число полным квадратом.*/
7815 	return this.sqrt().isZ();
7816 }
7817 
7818 Number.prototype.ts=
7819 Number.prototype.toStandart=function(p1){
7820 /**Возвращает представление числа в записи "по стандарту": с десятичной запятой и не более чем 10 знаками после неё.
7821 Для отсечения "ложной точности" хватает.*/
7822 	return this.toFixedLess(10).toStandart(p1);
7823 }
7824 
7825 Number.prototype.mzhd=function(a,b,c){
7826 /**Находится ли число между a и b, если c - то включительно. a и b можно не упорядочивать.*/
7827 	var p1=[a,b];
7828 	var p2=p1[p1.max()];
7829 	var p3=p1[p1.min()];
7830 	return (this<p2)&&(this>p3)||((this==p2)||(this==p3))&&(!!c);
7831 }
7832 
7833 Number.prototype.polozh=function(){
7834 /**Если число положительно, вернёт его, иначе 0.*/
7835 	return this<0?0:this;
7836 }
7837 
7838 Number.prototype.nod=function(p1){
7839 /**НОД данного числа и p1*/
7840 	var a,b;
7841 	a=this<0?-this:this;
7842 	b=p1<0?-p1:p1;
7843 	if(a==b) return a;
7844 	if((a==1)||(b==1))return 1;
7845 	if(a==0) return b;
7846 	if(b==0) return a;
7847 	if(a>b) return b.nod(a%b);
7848 			return a.nod(b%a);
7849 }
7850 
7851 Number.prototype.pina=function(p1){
7852 /**TeX-представление дроби, у которой в числителе данное число, умнолженное на пи, а в знаменателе p1.
7853 Случай p1=1 учитывается.*/
7854 	var a1={ch:this,zn:p1};
7855 	Drob.sokr(a1);
7856 	if(a1.ch==0)
7857 		return '0';
7858 	var z='';
7859 	if(a1.ch<0){
7860 		z='-';
7861 		a1.ch*=-1;
7862 	} 
7863 	return z+('\\frac{').esli(a1.zn!=1)+(a1.ch==1?'':a1.ch)+'\\pi'+('}{'+a1.zn+'}').esli(a1.zn!=1);
7864 }
7865 
7866 Number.prototype.koren=function(p1){
7867 /**TeX-представление корня из данного числа.
7868 Если данное число  полный квадрат, то само число.
7869 Если p1, то из-под корня будут вынесены возможные множители.*/
7870 	if(this.isPolnKvadr())
7871 		return this.ts();
7872 	var a='';
7873 	var t=this;
7874 	if(p1){
7875 		a=this.polnKvadrMnozh();
7876 		t=t/a.sqr();
7877 	}
7878 	return a+'\\sqrt{'+t.ts()+'}';
7879 }
7880 
7881 Number.prototype.polnKvadrMnozh=function(){
7882 /**Максимальный делитель данного числа, квадрат которого также является делителем данного числа.*/
7883 	if(this==0)
7884 		return 0;
7885 	var t=this.abs();
7886 	var i=1;
7887 	for(var rez=1;i.sqr()<=t;i++)
7888 		if(t.kratno(i.sqr()))
7889 			rez=i;
7890 	return rez;
7891 }
7892 
7893 Number.prototype.frac=function(p1){
7894 /**TeX-представление дроби, у которой в числителе данное число, а в знаменателе p1.
7895 Случай p1=1 учитывается.*/
7896 	var a1={ch:this,zn:p1};
7897 	if(p1.isString)
7898 		return ('\\frac{').esli(a1.zn!='1')+(a1.ch==1?'1':a1.ch)+('}{'+a1.zn+'}').esli(a1.zn!='1');
7899 	
7900 	Drob.sokr(a1);
7901 	if(a1.ch==0)return '0';
7902 	var z='';
7903 	if(a1.ch<0){
7904 		z='-';
7905 		a1.ch*=-1;
7906 	} 
7907 	return z+('\\frac{').esli(a1.zn!=1)+(a1.ch==1?'1':a1.ch)+('}{'+a1.zn+'}').esli(a1.zn!=1);
7908 	
7909 }
7910 
7911 Number.prototype.fracstr=function(p1,str){
7912 /**TeX-представление дроби с числителем - произведением данного числа и строки str и знаменателем p1.*/
7913 	var a1={ch:this,zn:p1};
7914 	if(p1.isString)
7915 		return 
7916 			a1.zn!=1?
7917 			'\\frac{'+a1.ch+str+'}{'+a1.zn+'}':
7918 			'{'+a1.ch+str+'}';
7919 	
7920 	Drob.sokr(a1);
7921 	if(!a1.ch)
7922 		return '0';
7923 	var z='';
7924 	if(a1.ch<0){
7925 		z='-';
7926 		a1.ch*=-1;
7927 	} 
7928 	return z+('\\frac{').esli(a1.zn!=1)+(a1.ch==1?str:a1.ch+str)+('}{'+a1.zn+'}').esli(a1.zn!=1);
7929 	
7930 }
7931 
7932 Number.prototype.kratno=function(p1){
7933 /**Кратно ли данное число p1*/
7934 	return !(this%p1);
7935 }
7936 
7937 Number.prototype.delit=function(p1){
7938 /**Является ли данное число делителем p1*/
7939 	return !(p1%this);
7940 }
7941 
7942 Number.prototype.sluchDel=function(){
7943 /**Возвращает случайный делитель числа.*/
7944 	for(var r=this+1;!this.kratno(r);r=sluchch(1,this)){};
7945 	return r; 
7946 }
7947 
7948 Number.prototype.toChMin=function(){
7949 /**Трактует число как количество минут и возвращает строку вида "A часов B минут".*/
7950 	var a=(this/60).floor();
7951 	var b=this%60;
7952 	return chislitlx(a,'час').esli(a)+' '.esli(a&&b)+chislitlx(b,'минута').esli(b);
7953 }
7954 
7955 Number.prototype.chislit=function(p1,p2,p3){
7956 /**Вспомогательная функция для согласования существительного с числительным.*/
7957 	return chislit(this,p1,p2,p3);
7958 }
7959 
7960 Number.prototype.chislitM=function(p1,p2,p3){
7961 /**Вспомогательная функция для согласования существительного с числительным.*/
7962 	return chislitM(this,p1,p2,p3);
7963 }
7964 
7965 Number.prototype.chislitlx=function(p1,p2){
7966 /**Возвращает строку, состоящую из данного числа и подходящего падежа слова p1, при этом
7967 полученное словосочетанию стоит в падеже p2 (есдли не указан - именительный).*/
7968 	return chislitlx(this,p1,p2);
7969 }
7970 
7971 Number.prototype.min=function(){
7972 /**Минимум из данного числа и всех аргументов функции.*/
7973 	var a=Array.prototype.slice.call(arguments);
7974 	a.push(this);
7975 	return a.minE();
7976 }
7977 
7978 Number.prototype.max=function(){
7979 /**Максиимум из данного числа и всех аргументов функции.*/
7980 	var a=Array.prototype.slice.call(arguments);
7981 	a.push(this);
7982 	return a.maxE();
7983 }
7984 
7985 Number.prototype.plusminus=Number.prototype.ts;
7986 
7987 Number.prototype.proporMezhdu=function(k,pr){
7988 /**Возвращает число, лежащее между данным и k пропорционально pr*/
7989 	return this+(k-this)*pr;
7990 }
7991 
7992 Number.prototype.toDvoet=function(a){
7993 /**Представить число в виде "часы-минуты" с двоеточием.*/
7994 	if(!a)
7995 		a=60;
7996 	return Math.floor(this/60)+':'+Math.floor(this%60).dopdo('0',2);
7997 }
7998 
7999 Number.prototype.okrugldo=function(p1){
8000 /**Округлить число до кратных p1*/
8001 	return okrugldo(this,p1);
8002 }
8003 
8004 Number.prototype.fct=function(){
8005 /**Факториал числа.*/
8006 	return this>0?(this-1).fct()*this:1;
8007 }
8008 
8009 Number.prototype.rub=function(){
8010 /**Возвращает строку вида this рублей*/
8011 	return chislitlx(this,'рубль');
8012 }
8013 
8014 Number.prototype.toComplex=function(){
8015 /**Представляет число в виде чисто действительного комплексного*/
8016 	return new Complex(this);
8017 }
8018 
8019 Number.prototype.isNumber=true;
8020 
8021 Number.prototype.addToGlobal('docsNumber',1);
8022 
8023 Number.prototype.pow=function(n){
8024 /**Возвращает число в степени n*/
8025 	return Math.pow(this,n);
8026 }
8027 
8028 Number.prototype.sqrt=function(){
8029 /**Квадратный корень из числа.*/
8030 	return Math.sqrt(this);
8031 }
8032 
8033 Number.prototype.sqr=function(){
8034 /**Квадрат числа.*/
8035 	return Math.pow(this,2);
8036 }
8037 Number.prototype.abs=function(){
8038 /**Модуль числа.*/
8039 	return Math.abs(this);
8040 }
8041 
8042 Number.prototype.floor=function(){
8043 /**Округлить число до целых в меньшую сторону.*/
8044 	return Math.floor(this);
8045 }
8046 
8047 Number.prototype.ceil=function(){
8048 /**Округлить число до целых в большую сторону.*/
8049 	return Math.ceil(this);
8050 }
8051 
8052 Number.prototype.arctg=
8053 Number.prototype.atan=function(){
8054 /**Арктангенс числа.*/
8055 	return Math.atan(this);
8056 }
8057 
8058 Number.prototype.arcsin=
8059 Number.prototype.asin=function(){
8060 /**Арксинус числа.*/
8061 	return Math.asin(this);
8062 }
8063 
8064 Number.prototype.arccos=
8065 Number.prototype.acos=function(){
8066 /**Арккосинус числа.*/
8067 	return Math.acos(this);
8068 }
8069 
8070 Number.prototype.arcctg=function(){
8071 /**Аркотангенс числа.*/
8072 	return Math.atan(1/this);
8073 }
8074 
8075 Number.prototype.sin=function(){
8076 /**Синус числа.*/
8077 	return Math.sin(this);
8078 }
8079 
8080 Number.prototype.cos=function(){
8081 /**Косинус числа.*/
8082 	return Math.cos(this);
8083 }
8084 
8085 Number.prototype.tg=
8086 Number.prototype.tan=function(){
8087 /**Тангенс числа.*/
8088 	return Math.tan(this);
8089 }
8090 
8091 Number.prototype.ctg=function(){
8092 /**Котангенс числа.*/
8093 	return 1/Math.tan(this);
8094 }
8095 
8096 Number.prototype.round=function(){
8097 /**Округление числа до целых.*/
8098 	return Math.round(this);
8099 }
8100 
8101 Number.prototype.addToGlobal('docsNumber',1);
8102 
8103 String.prototype.mesh=function(){
8104 /**Перемешивает строку посимвольно в случайном порядке*/
8105 	return this.split('').shuffle().soed();	
8106 };
8107 
8108 String.prototype.dopdo=function(c,n){
8109 /**Дополняет строку подстроками спереди, пока длина строки не станет не менее n.*/
8110 	var str=this;
8111 	for(;str.length<n;str=c+str){};
8112 	return str;
8113 };
8114 
8115 String.prototype.toZagl=function(){
8116 /**Делает первую букву строки заглавной*/
8117 	if(this=='')
8118 		return '';
8119 	return this[0].toUpperCase()+this.substr(1);//.toLowerCase();
8120 };
8121 
8122 String.prototype.frac=function(p1){
8123 /**Возвращает TeX-запись дроби, в которой числитель - данная строка, знаменатель p1.*/
8124 	return '\\frac{'+this+'}{'+p1+'}';
8125 }
8126 
8127 String.prototype.posl=function(){
8128 /**Возвращает последний символ строки*/
8129 	return this[this.length-1];
8130 };
8131 
8132 String.prototype.udalPosl=function(n){
8133 /**Удаляет n последних символов строки. При вызове без параметров удаляет 1 символ.*/
8134 	if(n==undefined)
8135 		n=1;
8136 	return this.substr(0,this.length-n);
8137 };
8138 
8139 String.prototype.udalPerv=function(n){
8140 /**Удаляет n первых символов строки. При вызове без параметров удаляет 1 символ.*/
8141 	if(n==undefined)
8142 		n=1;
8143 	return this.substr(n,this.length-n);
8144 };
8145 
8146 String.prototype.toStandart=function(p1){
8147 /**Приводит строку к записи "по стандарту": заменяет точку на запятую. 
8148 Если p1, то берёт запятую в фигурные скобки, чтобы убрать отступы в TeX.
8149 Предназначена для строк, содержащих представление числа.*/
8150 	var a=this.replace(/[.]/g,',');
8151 	if(p1)
8152 		a=a.replace(/[,]/,'{,}');
8153 	return a;
8154 };
8155 
8156 String.prototype.esli=function(p1){
8157 /**Возвращает данную строку, если p1, и пустую в противном случае.*/
8158 	return p1?this:'';
8159 }
8160 
8161 String.prototype.vTag=function(p1,p2){
8162 /**"Оборачивает" данную строку с тэг p1 c параметрами p2. p2 можно опускать.*/
8163 	return '<'+p1+(' '+p2).esli(p2)+'>'+this+'</'+p1+'>';
8164 }
8165 
8166 String.prototype.vTabl=function(p1,p2){
8167 /**"Оборачивает" данную строку в тэг таблицы. Применяется крайне редко и узко.*/
8168 	return (p1?p1:'<br/><br/>')+
8169 		this.vTag('table',p2?p2:'style="text-align:center;font:inherit;" border=1');
8170 		//.vTag('center');
8171 }
8172 
8173 String.prototype.reverse=function (){
8174 /**Переворачивает строку*/
8175 	return this.split('').reverse().soed();
8176 };//http://blog.stevenlevithan.com/archives/mimic-lookbehind-javascript //Товарищ очень сильно выручил
8177 
8178 String.prototype.tn=function(){
8179 /**Возвращает число, если данная строка - запись числа с десятичной точкой или запятой.*/
8180 	return 1*this.replace(',','.');
8181 };
8182 
8183 String.prototype.ob$=function(){
8184 /**Оборачивает строку в символы начала/конца формулы TeX - $*/
8185 	return '$'+this+'$';
8186 };
8187 
8188 String.prototype.encodeURIComponent=function(){
8189 	return encodeURIComponent(this);
8190 }
8191 
8192 String.prototype.decodeURIComponent=function(){
8193 	return decodeURIComponent(this);
8194 }
8195 
8196 String.prototype.encodeURI=function(){
8197 	return encodeURI(this);
8198 }
8199 
8200 String.prototype.decodeURI=function(){
8201 	return decodeURI(this);
8202 }
8203 
8204 String.prototype.neutralizeXSS=function(){
8205 /**Нейтрализует (экранирует) XSS-угрозы. По крайней мере, должна. Будет пополняться.*/
8206 	return this.replace(/<\//g,'');
8207 }
8208 
8209 String.prototype.toNumberExt=function(){
8210 /**Превращает арифметическое выражение (+-/*) в число.*/
8211 	if(/[\s0-9\.,\+\-\*\/\(\)]+/.test(this)){
8212 		try{
8213 			return eval(this.replace(/\,/g,'.'));
8214 		}catch(e){
8215 		}
8216 	}
8217 	return 0;
8218 }
8219 
8220 String.prototype.toMtr=function(){
8221 /**Превращает многострочный текст в матрицу строк.*/
8222 	var t=this.
8223 		replace(/<br[\/]*>/g,'\n').
8224 		replace(/[\t]+/g,' ').
8225 		trim();
8226 	var a=t.split(/\s*[\n\r]+\s*/);
8227 	var len=a.length;
8228 	for (var i=0;i<len;i++)
8229 		a[i]=a[i].split(/\s+/);
8230 	return a;
8231 }
8232 
8233 String.prototype.istDataToStd=function(){
8234 /**Приводит дату, записанную в одной из общепринятых форм, к записи "по стандарту". Применяется только в комплексе заданий по истории.*/
8235 	var a=this;
8236 	a=a.replace(/\s/g,'.');
8237 	a=a.replace(/\//g,'.');
8238 	a=a.replace(/[-]/g,'.');
8239 	a=a.replace(/[,]/g,'.');
8240 	a=a.replace(/ю/g,'.');
8241 	a=a.replace(/[.]+/g,'.');
8242 	a=a.replace(/[.]0/g,'.');
8243 	a=a.replace(/^0/g,'');
8244 	a=a.replace(/^[.]/g,'');
8245 	//Убираем г. в конце, если есть
8246 	a=a.replace(/[.]$/g,'');
8247 	a=a.replace(/г$/g,'');
8248 	a=a.replace(/[.]$/g,'');
8249 	//Теперь меняем номер месяца на месяц
8250 	a=a.replace(/[.]1[.]/g, ' января '	);
8251 	a=a.replace(/[.]2[.]/g, ' февраля '	);
8252 	a=a.replace(/[.]3[.]/g, ' марта '	);
8253 	a=a.replace(/[.]4[.]/g, ' апреля '	);
8254 	a=a.replace(/[.]5[.]/g, ' мая '		);
8255 	a=a.replace(/[.]6[.]/g, ' июня '	);
8256 	a=a.replace(/[.]7[.]/g, ' июля '	);
8257 	a=a.replace(/[.]8[.]/g, ' августа '	);
8258 	a=a.replace(/[.]9[.]/g, ' сентября ');
8259 	a=a.replace(/[.]10[.]/g,' октября '	);
8260 	a=a.replace(/[.]11[.]/g,' ноября '	);
8261 	a=a.replace(/[.]12[.]/g,' декабря '	);
8262 	//И наконец, если исправление буквы "ю" на точку привело к повреждению названия месяца:
8263 	a=a.replace(/и[.]ня/g, 'июня'	);
8264 	a=a.replace(/и[.]ля/g, 'июля'	);
8265 	//Меняем точки на пробелы
8266 	a=a.replace(/[.]/g, ' '	);
8267 	
8268 	a=a+' г.';
8269 
8270 	return a;
8271 };
8272 
8273 String.prototype.plusminus=function(){
8274 /**Примитивное упрощение математических выражений. Меняет "++" на "+", например.*/
8275 	var a=this;
8276 	for(;a.match(/[+-][+-]/);){
8277 		a=a.replace(/[+][+]/g,'+');
8278 		a=a.replace(/--/g,'+');
8279 		a=a.replace(/[+]-/g,'-');
8280 		a=a.replace(/-[+]/g,'-');
8281 		a=a.replace(/[+]$/g,'');
8282 		a=a.replace(/[{][+]/g,'{');
8283 		a=a.replace(/[+][}]/g,'}');
8284 		a=a.replace(/\(\+/g,'(');
8285 		a=a.replace(/\+\)/g,')');
8286 	}
8287 	a=a.replace(/[=]\s*[+]/g,'=');
8288 	a=a.replace(/[+]1(?=[A-Za-zА-Яа-яЁё\\(])/g,'+');
8289 	a=a.replace(/[-]1(?=[A-Za-zА-Яа-яЁё\\(])/g,'-');
8290 	a=a.replace(/[{]1(?=[A-Za-zА-Яа-яЁё\\(])/g,'{');
8291 	a=a.replace(/[}]1(?=[A-Za-zА-Яа-яЁё\\(])/g,'}');
8292 	a=a.replace(/[ ]1(?=[A-Za-zА-Яа-яЁё\\(])/g,' ');
8293 	a=a.replace(/[~]1(?=[A-Za-zА-Яа-яЁё\\(])/g,'~');
8294 	a=a.replace(/[(]1(?=[A-Za-zА-Яа-яЁё\\(])/g,'(');
8295 	a=a.replace(/[)]1(?=[A-Za-zА-Яа-яЁё\\(])/g,')');
8296 	a=a.replace(/[=]1(?=[A-Za-zА-Яа-яЁё\\(])/g,'=');
8297 	a=a.replace(/[;]1(?=[A-Za-zА-Яа-яЁё\\(])/g,';');
8298 	a=a.replace(/\^1(?=[A-Za-zА-Яа-яЁё\\(])/g,'^');
8299 	a=a.replace(/\$1(?=[A-Za-zА-Яа-яЁё\\(])/g,'$');
8300 	a=a.replace(/^1(?=[A-Za-zА-Яа-яЁё])/g,'');
8301 	a=a.replace(/^[+]/g,'');
8302 	a=a.replace(/[;][-]0/g,';0');
8303 	a=a.reverse();
8304 	a=a.replace(/[.]{2}(?=[A-Za-zА-Яа-яЁё])/g,'.');
8305 	a=a.replace(/[.]{1}[$][.]{1}(?=[A-Za-zА-Яа-яЁё\\])/g,'$.');
8306 	a=a.reverse();
8307 	return a;
8308 };
8309 
8310 String.prototype.insert=function(i,str) {
8311 //вставляет в строку после i-го символа
8312 	var ss='';
8313 	if (i>0)
8314 		ss=this.substring(0, i);
8315 	var sss='';
8316 	if (i<this.length-1)
8317 		sss=this.substring(i);
8318 	return ss+str+sss;
8319 }
8320 
8321 String.prototype.isLetter=function() {
8322 /**проверяет, буква ли данный символ*/
8323 	var d = (this.length==1) && (this.search(/[a-z]/)!=-1);
8324 	return d;
8325 }
8326 
8327 String.prototype.isGl=function() {
8328 /**проверяет, гласная ли данный символ*/
8329 	var d = (this.search(/[aeiou]/)!=-1) && (this.length==1);
8330 	return d;
8331 }
8332 
8333 String.prototype.cepZamena=function(mas1, mas2){
8334 /**Заменяет i-й символ из массива mas1 i-м символом из массива mas2*/
8335 	var len=this.length;
8336 	var rez='';
8337 	var fl;
8338 	for(var i=0; i<len; i++){
8339 		fl=1;
8340 		for(var j=0;j<26 && fl;j++){
8341 			if(this[i]==mas1[j]){
8342 				rez+=mas2[j];
8343 				fl=0;
8344 			}
8345 		}
8346 		if(fl){
8347 			rez+=this[i];
8348 		}
8349 	}
8350 	return rez;
8351 }
8352 
8353 String.prototype.multiply=function(n){
8354 /**Возвращает строку, записанную n раз подряд*/
8355 	var rez=this;
8356 	for(var i=1;i<n;i++)
8357 		rez+=this;
8358 	return rez;
8359 }
8360 
8361 String.prototype.isString=true;
8362 
8363 String.prototype.addToGlobal('docsString',1);
8364 
8365 
8366 Function.prototype.toStr=function(){
8367 /**Возвращает код функции в виде строки*/
8368 	return ''+this;
8369 }
8370 
8371 Function.prototype.telo=function(){
8372 /**Возвращает тело функции в виде строки*/
8373 	return this.toStr().replace(/}$/,'').replace(/^function \(.*\){/,'');
8374 }
8375 
8376 Function.prototype.zagl=function(){
8377 /**Возвращает заголовок функции в виде строки*/
8378 	return /^function \(.*\)/.exec(this.toStr())[0];
8379 }
8380 
8381 Function.prototype.attr=function(){
8382 /**Возвращает список параметров функции в виде строки*/
8383 	return this.zagl().replace(/^function /,'');
8384 }
8385 
8386 Function.prototype.codeComment=function(){
8387 /**Возвращает первый документационный комментарий внутри функции - такой, как этот.*/
8388 	try{
8389 	return /\/\*\*.*?[\s\S]*?\*\//m.
8390 		exec(this.toStr())[0].
8391 		replace(/^\/\*\*/,'').
8392 		replace(/\*\/$/,'');
8393 	}catch(e){
8394 		return '';
8395 	}
8396 }
8397 
8398 Function.prototype.isFunction=true;
8399 
8400 Function.prototype.addToGlobal('docsFunction',1);
8401 
8402 RegExp.prototype.isRegExp=true;
8403 
8404 RegExp.prototype.addToGlobal('docsRegExp',1);
8405 ////////////////////////////////////////////////////////////////////////
8406 //
8407 //	ie: именительный	падеж единственного	числа
8408 //	re: родительный		падеж единственного	числа
8409 //	de: дательный		падеж единственного	числа
8410 //	ve: винительный		падеж единственного	числа
8411 //	te: творительный	падеж единственного	числа
8412 //	pe: предложный		падеж единственного	числа
8413 //	ie: именительный	падеж множественного	числа
8414 //	re: родительный		падеж множественного	числа
8415 //	de: дательный		падеж множественного	числа
8416 //	ve: винительный		падеж множественного	числа
8417 //	te: творительный	падеж множественного	числа
8418 //	pe: предложный		падеж множественного	числа
8419 //
8420 //	rod: род:
8421 //		0: мужской
8422 //		1: женский
8423 //		2: средний
8424 //		3: только множественное число
8425 //
8426 //	odu: одушевлённость:
8427 //		0: неодушевлённое
8428 //		1: одушевлённое
8429 //
8430 //	skl: склонение:
8431 //		0: несклоняемое
8432 //		1: первое
8433 //		2: второе
8434 //		3: третье
8435 //		4: разносклоняемые существительные
8436 ////////////////////////////////////////////////////////////////////////
8437 if(lx==undefined)
8438 	var lx=[];	//Объявляем глобальный объект lx
8439 ////////////////////////////////////////////////////////////////////////
8440 
8441 
8442 //{{Существительные
8443 lx['август']={
8444 	ie:'август',
8445 	re:'августа',
8446 	de:'августу',
8447 	ve:'август',
8448 	te:'августом',
8449 	pe:'августе',
8450 	im:'августы',
8451 	rm:'августов',
8452 	dm:'августам',
8453 	vm:'августы',
8454 	tm:'августами',
8455 	pm:'августах',
8456 	rod:0,
8457 	skl:2,
8458 	odu:0,
8459 };
8460 lx['Австралия']={
8461 	ie:'Австралия',
8462 	re:'Австралии',
8463 	de:'Австралии',
8464 	ve:'Австралию',
8465 	te:'Австралией',
8466 	pe:'Австралии',
8467 	im:'Австралии',
8468 	rm:'Австралий',
8469 	dm:'Австралиям',
8470 	vm:'Австралии',
8471 	tm:'Австралиями',
8472 	pm:'Австралиях',
8473 	rod:1,
8474 	skl:1,
8475 	odu:0,
8476 };
8477 lx['Австрия']={
8478 	ie:'Австрия',
8479 	re:'Австрии',
8480 	de:'Австрии',
8481 	ve:'Австрию',
8482 	te:'Австрией',
8483 	pe:'Австрии',
8484 	im:'Австрии',
8485 	rm:'Австрий',
8486 	dm:'Австриям',
8487 	vm:'Австрии',
8488 	tm:'Австриями',
8489 	pm:'Австриях',
8490 	rod:1,
8491 	skl:1,
8492 	odu:0,
8493 };
8494 lx['автобус']={
8495 	ie:'автобус',
8496 	re:'автобуса',
8497 	de:'автобусу',
8498 	ve:'автобус',
8499 	te:'автобусом',
8500 	pe:'автобусе',
8501 	im:'автобусы',
8502 	rm:'автобусов',
8503 	dm:'автобусам',
8504 	vm:'автобусы',
8505 	tm:'автобусами',
8506 	pm:'автобусах',
8507 	rod:0,
8508 	skl:2,
8509 	odu:0,
8510 }; 
8511 lx['автомобиль']={
8512 	ie:'автомобиль',
8513 	re:'автомобиля',
8514 	de:'автомобилю',
8515 	ve:'автомобиль',
8516 	te:'автомобилем',
8517 	pe:'автомобиле',
8518 	im:'автомобили',
8519 	rm:'автомобилей',
8520 	dm:'автомобилям',
8521 	vm:'автомобили',
8522 	tm:'автомобилями',
8523 	pm:'автомобилях',
8524 	rod:0,
8525 	skl:2,
8526 	odu:0,
8527 };
8528 lx['аквариум']={
8529 	ie:'аквариум',
8530 	re:'аквариума',
8531 	de:'аквариуму',
8532 	ve:'аквариум',
8533 	te:'аквариумом',
8534 	pe:'аквариуме',
8535 	im:'аквариумы',
8536 	rm:'аквариумов',
8537 	dm:'аквариумам',
8538 	vm:'аквариумы',
8539 	tm:'аквариумами',
8540 	pm:'аквариумах',
8541 	rod:0,
8542 	skl:2,
8543 	odu:0,
8544 };
8545 lx['Анастасия']={
8546 	ie:'Анастасия',
8547 	re:'Анастасии',
8548 	de:'Анастасии',
8549 	ve:'Анастасию',
8550 	te:'Анастасией',
8551 	pe:'Анастасии',
8552 	im:'Анастасии',
8553 	rm:'Анастасий',
8554 	dm:'Анастасиям',
8555 	vm:'Анастасий',
8556 	tm:'Анастасиями',
8557 	pm:'Анастасиях',
8558 	rod:1,
8559 	skl:1,
8560 	odu:1,
8561 	sbs:1,
8562 };
8563 lx['Анатольевна']={
8564 	ie:'Анатольевна',
8565 	re:'Анатольевны',
8566 	de:'Анатольевне',
8567 	ve:'Анатольевну',
8568 	te:'Анатольевной',
8569 	pe:'Анатольевне',
8570 	im:'Анатольевны',
8571 	rm:'Анатольевн',
8572 	dm:'Анатольевнам',
8573 	vm:'Анатольевн',
8574 	tm:'Анатольевнами',
8575 	pm:'Анатольевнах',
8576 	rod:1,
8577 	skl:1,
8578 	odu:1,
8579 	sbs:1,
8580 };
8581 lx['Англия']={
8582 	ie:'Англия',
8583 	re:'Англии',
8584 	de:'Англии',
8585 	ve:'Англию',
8586 	te:'Англией',
8587 	pe:'Англии',
8588 	im:'Англии',
8589 	rm:'Англий',
8590 	dm:'Англиям',
8591 	vm:'Англии',
8592 	tm:'Англиями',
8593 	pm:'Англиях',
8594 	rod:1,
8595 	skl:1,
8596 	odu:0,
8597 	sbs:1,
8598 };
8599 lx['апрель']={
8600 	ie:'апрель',
8601 	re:'апреля',
8602 	de:'апрелю',
8603 	ve:'апрель',
8604 	te:'апрелем',
8605 	pe:'апреле',
8606 	im:'апрели',
8607 	rm:'апрелей',
8608 	dm:'апрелям',
8609 	vm:'апрели',
8610 	tm:'апрелями',
8611 	pm:'апрелях',
8612 	rod:0,
8613 	skl:2,
8614 	odu:0,
8615 };
8616 lx['аспирантка']={
8617 	ie:'аспирантка',
8618 	re:'аспирантки',
8619 	de:'аспирантке',
8620 	ve:'аспирантку',
8621 	te:'аспиранткой',
8622 	pe:'аспирантке',
8623 	im:'аспирантки',
8624 	rm:'аспиранток',
8625 	dm:'аспиранткам',
8626 	vm:'аспиранток',
8627 	tm:'аспирантками',
8628 	pm:'аспирантках',
8629 	rod:1,
8630 	skl:1,
8631 	odu:0,
8632 };
8633 lx['атомоход']={
8634 	ie:'атомоход',
8635 	re:'атомохода',
8636 	de:'атомоходу',
8637 	ve:'атомоход',
8638 	te:'атомоходом',
8639 	pe:'атомоходе',
8640 	im:'атомоходы',
8641 	rm:'атомоходов',
8642 	dm:'атомоходам',
8643 	vm:'атомоходы',
8644 	tm:'атомоходами',
8645 	pm:'атомоходах',
8646 	rod:0,
8647 	skl:2,
8648 	odu:0,
8649 };
8650 lx['бадминтон']={
8651 	ie:'бадминтон',
8652 	re:'бадминтона',
8653 	de:'бадминтону',
8654 	ve:'бадминтон',
8655 	te:'бадминтоном',
8656 	pe:'бадминтоне',
8657 	im:'бадминтоны',
8658 	rm:'бадминтонов',
8659 	dm:'бадминтонам',
8660 	vm:'бадминтоны',
8661 	tm:'бадминтонами',
8662 	pm:'бадминтонах',
8663 	rod:0,
8664 	skl:2,
8665 	odu:0,
8666 };
8667 lx['батон']={
8668 	ie:'батон',
8669 	re:'батона',
8670 	de:'батону',
8671 	ve:'батон',
8672 	te:'батоном',
8673 	pe:'батоне',
8674 	im:'батоны',
8675 	rm:'батонов',
8676 	dm:'батонам',
8677 	vm:'батоны',
8678 	tm:'батонами',
8679 	pm:'батонах',
8680 	rod:0,
8681 	skl:2,
8682 	odu:0,
8683 };
8684 lx['Белоруссия']={
8685 	ie:'Белоруссия',
8686 	re:'Белоруссии',
8687 	de:'Белоруссии',
8688 	ve:'Белоруссию',
8689 	te:'Белоруссией',
8690 	pe:'Белоруссии',
8691 	im:'Белоруссии',
8692 	rm:'Белоруссий',
8693 	dm:'Белоруссиям',
8694 	vm:'Белоруссии',
8695 	tm:'Белоруссиями',
8696 	pm:'Белоруссиях',
8697 	rod:1,
8698 	skl:1,
8699 	odu:0,
8700 	sbs:1,
8701 };
8702 lx['Бельгия']={
8703 	ie:'Бельгия',
8704 	re:'Бельгии',
8705 	de:'Бельгии',
8706 	ve:'Бельгию',
8707 	te:'Бельгией',
8708 	pe:'Бельгии',
8709 	im:'Бельгии',
8710 	rm:'Бельгий',
8711 	dm:'Бельгиям',
8712 	vm:'Бельгии',
8713 	tm:'Бельгиями',
8714 	pm:'Бельгиях',
8715 	rod:1,
8716 	skl:1,
8717 	odu:0,
8718 };
8719 lx['бензин']={
8720 	ie:'бензин',
8721 	re:'бензина',
8722 	de:'бензину',
8723 	ve:'бензин',
8724 	te:'бензином',
8725 	pe:'бензине',
8726 	im:'бензины',
8727 	rm:'бензинов',
8728 	dm:'бензинам',
8729 	vm:'бензины',
8730 	tm:'бензинами',
8731 	pm:'бензинах',
8732 	rod:0,
8733 	skl:2,
8734 	odu:0,
8735 }; 
8736 lx['бетон']={
8737 	ie:'бетон',
8738 	re:'бетона',
8739 	de:'бетону',
8740 	ve:'бетон',
8741 	te:'бетоном',
8742 	pe:'бетоне',
8743 	im:'бетоны',
8744 	rm:'бетонов',
8745 	dm:'бетонам',
8746 	vm:'бетоны',
8747 	tm:'бетонами',
8748 	pm:'бетонах',
8749 	rod:0,
8750 	skl:2,
8751 	odu:0,
8752 };
8753 lx['блондинка']={
8754 	ie:'блондинка',
8755 	re:'блондинки',
8756 	de:'блондинке',
8757 	ve:'блондинку',
8758 	te:'блондинкой',
8759 	pe:'блондинке',
8760 	im:'блондинки',
8761 	rm:'блондинок',
8762 	dm:'блондинкам',
8763 	vm:'блондинок',
8764 	tm:'блондинками',
8765 	pm:'блондинках',
8766 	rod:1,
8767 	skl:1,
8768 	odu:0,
8769 };
8770 lx['Бразилия']={
8771 	ie:'Бразилия',
8772 	re:'Бразилии',
8773 	de:'Бразилии',
8774 	ve:'Бразилию',
8775 	te:'Бразилией',
8776 	pe:'Бразилии',
8777 	im:'Бразилии',
8778 	rm:'Бразилий',
8779 	dm:'Бразилиям',
8780 	vm:'Бразилии',
8781 	tm:'Бразилиями',
8782 	pm:'Бразилиях',
8783 	rod:1,
8784 	skl:1,
8785 	odu:0,
8786 };
8787 lx['брус']={
8788 	ie:'брус',
8789 	re:'бруса',
8790 	de:'брусу',
8791 	ve:'брус',
8792 	te:'брусом',
8793 	pe:'брусе',
8794 	im:'брусья',
8795 	rm:'брусьев',
8796 	dm:'брусьям',
8797 	vm:'брусья',
8798 	tm:'брусьями',
8799 	pm:'брусьях',
8800 	rod:0,
8801 	skl:2,
8802 	odu:0,
8803 };
8804 lx['булавка']={
8805 	ie:'булавка',
8806 	re:'булавки',
8807 	de:'булавке',
8808 	ve:'булавку',
8809 	te:'булавкой',
8810 	pe:'булавке',
8811 	im:'булавки',
8812 	rm:'булавок',
8813 	dm:'булавкам',
8814 	vm:'булавки',
8815 	tm:'булавками',
8816 	pm:'булавках',
8817 	rod:1,
8818 	skl:1,
8819 	odu:0,
8820 };
8821 lx['бутерброд']={
8822 	ie:'бутерброд',
8823 	re:'бутерброда',
8824 	de:'бутерброду',
8825 	ve:'бутерброд',
8826 	te:'бутербродом',
8827 	pe:'бутерброде',
8828 	im:'бутерброды',
8829 	rm:'бутербродов',
8830 	dm:'бутербродам',
8831 	vm:'бутерброды',
8832 	tm:'бутербродами',
8833 	pm:'бутербродах',
8834 	rod:0,
8835 	skl:2,
8836 	odu:0,
8837 };
8838 lx['Васильевна']={
8839 	ie:'Васильевна',
8840 	re:'Васильевны',
8841 	de:'Васильевне',
8842 	ve:'Васильевну',
8843 	te:'Васильевной',
8844 	pe:'Васильевне',
8845 	im:'Васильевны',
8846 	rm:'Васильевн',
8847 	dm:'Васильевнам',
8848 	vm:'Васильевн',
8849 	tm:'Васильевнами',
8850 	pm:'Васильевнах',
8851 	rod:1,
8852 	skl:1,
8853 	odu:0,
8854 };
8855 lx['веб-дизайнер']={
8856 	ie:'веб-дизайнер',
8857 	re:'веб-дизайнера',
8858 	de:'веб-дизайнеру',
8859 	ve:'веб-дизайнера',
8860 	te:'веб-дизайнером',
8861 	pe:'веб-дизайнере',
8862 	im:'веб-дизайнеры',
8863 	rm:'веб-дизайнеров',
8864 	dm:'веб-дизайнерам',
8865 	vm:'веб-дизайнеров',
8866 	tm:'веб-дизайнерами',
8867 	pm:'веб-дизайнерах',
8868 	rod:0,
8869 	skl:2,
8870 	odu:0,
8871 };
8872 lx['ведомство']={
8873 	ie:'ведомство',
8874 	re:'ведомства',
8875 	de:'ведомству',
8876 	ve:'ведомство',
8877 	te:'ведомством',
8878 	pe:'ведомстве',
8879 	im:'ведомства',
8880 	rm:'ведомств',
8881 	dm:'ведомствам',
8882 	vm:'ведомства',
8883 	tm:'ведомствами',
8884 	pm:'ведомствах',
8885 	rod:2,
8886 	skl:2,
8887 	odu:0,
8888 };
8889 lx['велосипед']={
8890 	ie:'велосипед',
8891 	re:'велосипеда',
8892 	de:'велосипеду',
8893 	ve:'велосипед',
8894 	te:'велосипедом',
8895 	pe:'велосипеде',
8896 	im:'велосипеды',
8897 	rm:'велосипедов',
8898 	dm:'велосипедам',
8899 	vm:'велосипеды',
8900 	tm:'велосипедами',
8901 	pm:'велосипедах',
8902 	rod:0,
8903 	skl:2,
8904 	odu:0,
8905 };
8906 lx['Венесуэла']={
8907 	ie:'Венесуэла',
8908 	re:'Венесуэлы',
8909 	de:'Венесуэле',
8910 	ve:'Венесуэлу',
8911 	te:'Венесуэлой',
8912 	pe:'Венесуэле',
8913 	im:'Венесуэлы',
8914 	rm:'Венесуэл',
8915 	dm:'Венесуэлам',
8916 	vm:'Венесуэлы',
8917 	tm:'Венесуэлами',
8918 	pm:'Венесуэлах',
8919 	rod:1,
8920 	skl:1,
8921 	odu:0,
8922 };
8923 lx['Вероника']={
8924 	ie:'Вероника',
8925 	re:'Вероники',
8926 	de:'Веронике',
8927 	ve:'Веронику',
8928 	te:'Вероникой',
8929 	pe:'Веронике',
8930 	im:'Вероники',
8931 	rm:'Вероник',
8932 	dm:'Вероникам',
8933 	vm:'Вероник',
8934 	tm:'Верониками',
8935 	pm:'Верониках',
8936 	rod:1,
8937 	skl:1,
8938 	odu:0,
8939 };
8940 lx['верста']={
8941 	ie:'верста',
8942 	re:'версты',
8943 	de:'версте',
8944 	ve:'версту',
8945 	te:'верстой',
8946 	pe:'версте',
8947 	im:'вёрсты',
8948 	rm:'вёрст',
8949 	dm:'вёрстам',
8950 	vm:'вёрсты',
8951 	tm:'вёрстами',
8952 	pm:'вёрстах',
8953 	rod:1,
8954 	skl:1,
8955 	odu:0,
8956 };
8957 lx['витрина']={
8958 	ie:'витрина',
8959 	re:'витрины',
8960 	de:'витрине',
8961 	ve:'витрину',
8962 	te:'витриной',
8963 	pe:'витрине',
8964 	im:'витрины',
8965 	rm:'витрин',
8966 	dm:'витринам',
8967 	vm:'витрины',
8968 	tm:'витринами',
8969 	pm:'витринах',
8970 	rod:1,
8971 	skl:1,
8972 	odu:0,
8973 };
8974 lx['вода']={
8975 	ie:'вода',
8976 	re:'воды',
8977 	de:'воде',
8978 	ve:'воду',
8979 	te:'водой',
8980 	pe:'воде',
8981 	im:'воды',
8982 	rm:'вод',
8983 	dm:'водам',
8984 	vm:'воды',
8985 	tm:'водами',
8986 	pm:'водах',
8987 	rod:1,
8988 	skl:1,
8989 	odu:0,
8990 };
8991 lx['Воронеж']={
8992 	ie:'Воронеж',
8993 	re:'Воронежа',
8994 	de:'Воронежу',
8995 	ve:'Воронеж',
8996 	te:'Воронежом',
8997 	pe:'Воронеже',
8998 	im:'Воронежи',
8999 	rm:'Воронежей',
9000 	dm:'Воронежам',
9001 	vm:'Воронежи',
9002 	tm:'Воронежами',
9003 	pm:'Воронежах',
9004 	rod:0,
9005 	skl:2,
9006 	odu:0,
9007 	sbs:1,
9008 	chr:1,
9009 };
9010 lx['воскресенье']={
9011 	ie:'воскресенье',
9012 	re:'воскресенья',
9013 	de:'воскресенью',
9014 	ve:'воскресенье',
9015 	te:'воскресеньем',
9016 	pe:'воскресенье',
9017 	im:'воскресенья',
9018 	rm:'воскресений',
9019 	dm:'воскресеньям',
9020 	vm:'воскресенья',
9021 	tm:'воскресеньями',
9022 	pm:'воскресеньях',
9023 	rod:2,
9024 	skl:2,
9025 	odu:0,
9026 };
9027 lx['время']={
9028 	ie:'время',
9029 	re:'времени',
9030 	de:'времени',
9031 	ve:'время',
9032 	te:'временем',
9033 	pe:'времени',
9034 	im:'времена',
9035 	rm:'времён',
9036 	dm:'временам',
9037 	vm:'времена',
9038 	tm:'временами',
9039 	pm:'временах',
9040 	rod:0,
9041 	skl:4,
9042 	odu:0,
9043 };
9044 lx['вторник']={
9045 	ie:'вторник',
9046 	re:'вторника',
9047 	de:'вторнику',
9048 	ve:'вторник',
9049 	te:'вторником',
9050 	pe:'вторнике',
9051 	im:'вторники',
9052 	rm:'вторников',
9053 	dm:'вторникам',
9054 	vm:'вторники',
9055 	tm:'вторниками',
9056 	pm:'вторниках',
9057 	rod:0,
9058 	skl:2,
9059 	odu:0,
9060 };
9061 lx['выступление']={
9062 	ie:'выступление',
9063 	re:'выступления',
9064 	de:'выступлению',
9065 	ve:'выступление',
9066 	te:'выступлением',
9067 	pe:'выступлении',
9068 	im:'выступления',
9069 	rm:'выступлений',
9070 	dm:'выступлениям',
9071 	vm:'выступления',
9072 	tm:'выступлениями',
9073 	pm:'выступлениях',
9074 	rod:2,
9075 	skl:2,
9076 	odu:0,
9077 	sbs:0,
9078 	chr:1,
9079 	rmn:'выступлениев',
9080 };
9081 lx['газ']={
9082 	ie:'газ',
9083 	re:'газа',
9084 	de:'газу',
9085 	ve:'газ',
9086 	te:'газом',
9087 	pe:'газе',
9088 	im:'газы',
9089 	rm:'газов',
9090 	dm:'газам',
9091 	vm:'газы',
9092 	tm:'газами',
9093 	pm:'газах',
9094 	rod:0,
9095 	skl:2,
9096 	odu:0,
9097 }; 
9098 lx['гараж']={
9099 	ie:'гараж',
9100 	re:'гаража',
9101 	de:'гаражу',
9102 	ve:'гараж',
9103 	te:'гаражом',
9104 	pe:'гараже',
9105 	im:'гаражы',
9106 	rm:'гаражов',
9107 	dm:'гаражам',
9108 	vm:'гаражы',
9109 	tm:'гаражами',
9110 	pm:'гаражах',
9111 	rod:0,
9112 	skl:2,
9113 	odu:0,
9114 };
9115 lx['Германия']={
9116 	ie:'Германия',
9117 	re:'Германии',
9118 	de:'Германии',
9119 	ve:'Германию',
9120 	te:'Германией',
9121 	pe:'Германии',
9122 	im:'Германии',
9123 	rm:'Германий',
9124 	dm:'Германиям',
9125 	vm:'Германии',
9126 	tm:'Германиями',
9127 	pm:'Германиях',
9128 	rod:1,
9129 	skl:1,
9130 	odu:0,
9131 };
9132 lx['гимнастика']={
9133 	ie:'гимнастика',
9134 	re:'гимнастики',
9135 	de:'гимнастике',
9136 	ve:'гимнастику',
9137 	te:'гимнастикой',
9138 	pe:'гимнастике',
9139 	im:'гимнастики',
9140 	rm:'гимнастик',
9141 	dm:'гимнастикам',
9142 	vm:'гимнастики',
9143 	tm:'гимнастиками',
9144 	pm:'гимнастиках',
9145 	rod:1,
9146 	skl:1,
9147 	odu:0,
9148 };
9149 lx['город']={
9150 	ie:'город',
9151 	re:'города',
9152 	de:'городу',
9153 	ve:'город',
9154 	te:'городом',
9155 	pe:'городе',
9156 	im:'города',
9157 	rm:'городов',
9158 	dm:'городам',
9159 	vm:'города',
9160 	tm:'городами',
9161 	pm:'городах',
9162 	rod:0,
9163 	skl:2,
9164 	odu:0,
9165 }; 
9166 lx['городок']={
9167 	ie:'городок',
9168 	re:'городка',
9169 	de:'городку',
9170 	ve:'городок',
9171 	te:'городком',
9172 	pe:'городке',
9173 	im:'городки',
9174 	rm:'городков',
9175 	dm:'городкам',
9176 	vm:'городки',
9177 	tm:'городками',
9178 	pm:'городках',
9179 	rod:0,
9180 	skl:2,
9181 	odu:0,
9182 };
9183 lx['гравий']={
9184 	ie:'гравий',
9185 	re:'гравия',
9186 	de:'гравию',
9187 	ve:'гравий',
9188 	te:'гравием',
9189 	pe:'гравии',
9190 	im:'гравии',
9191 	rm:'гравиев',
9192 	dm:'гравиям',
9193 	vm:'гравии',
9194 	tm:'гравиями',
9195 	pm:'гравиях',
9196 	rod:0,
9197 	skl:2,
9198 	odu:0,
9199 };
9200 lx['гранит']={
9201 	ie:'гранит',
9202 	re:'гранита',
9203 	de:'граниту',
9204 	ve:'гранит',
9205 	te:'гранитом',
9206 	pe:'граните',
9207 	im:'граниты',
9208 	rm:'гранитов',
9209 	dm:'гранитам',
9210 	vm:'граниты',
9211 	tm:'гранитами',
9212 	pm:'гранитах',
9213 	rod:0,
9214 	skl:2,
9215 	odu:0,
9216 };
9217 lx['грузовик']={
9218 	ie:'грузовик',
9219 	re:'грузовика',
9220 	de:'грузовику',
9221 	ve:'грузовик',
9222 	te:'грузовиком',
9223 	pe:'грузовике',
9224 	im:'грузовики',
9225 	rm:'грузовиков',
9226 	dm:'грузовикам',
9227 	vm:'грузовики',
9228 	tm:'грузовиками',
9229 	pm:'грузовиках',
9230 	rod:0,
9231 	skl:2,
9232 	odu:0,
9233 };
9234 lx['груша']={
9235 	ie:'груша',
9236 	re:'груши',
9237 	de:'груше',
9238 	ve:'грушу',
9239 	te:'грушой',
9240 	pe:'груше',
9241 	im:'груши',
9242 	rm:'груш',
9243 	dm:'грушам',
9244 	vm:'груши',
9245 	tm:'грушами',
9246 	pm:'грушах',
9247 	rod:1,
9248 	skl:1,
9249 	odu:0,
9250 };
9251 lx['Дарья']={
9252 	ie:'Дарья',
9253 	re:'Дарьи',
9254 	de:'Дарье',
9255 	ve:'Дарью',
9256 	te:'Дарьей',
9257 	pe:'Дарье',
9258 	im:'Дарьи',
9259 	rm:'Дарий',
9260 	dm:'Дарьям',
9261 	vm:'Дарьи',
9262 	tm:'Дарьями',
9263 	pm:'Дарьях',
9264 	rod:1,
9265 	skl:1,
9266 	odu:0,
9267 };
9268 lx['дача']={
9269 	ie:'дача',
9270 	re:'дачи',
9271 	de:'даче',
9272 	ve:'дачу',
9273 	te:'дачей',
9274 	pe:'даче',
9275 	im:'дачи',
9276 	rm:'дач',
9277 	dm:'дачам',
9278 	vm:'дачи',
9279 	tm:'дачами',
9280 	pm:'дачах',
9281 	rod:1,
9282 	skl:1,
9283 	odu:0,
9284 };
9285 lx['декада']={
9286 	ie:'декада',
9287 	re:'декады',
9288 	de:'декаде',
9289 	ve:'декаду',
9290 	te:'декадой',
9291 	pe:'декаде',
9292 	im:'декады',
9293 	rm:'декад',
9294 	dm:'декадам',
9295 	vm:'декады',
9296 	tm:'декадами',
9297 	pm:'декадах',
9298 	rod:1,
9299 	skl:1,
9300 	odu:0,
9301 };
9302 lx['дельтоид']={
9303 	ie:'дельтоид',
9304 	re:'дельтоида',
9305 	de:'дельтоиду',
9306 	ve:'дельтоид',
9307 	te:'дельтоидом',
9308 	pe:'дельтоиде',
9309 	im:'дельтоиды',
9310 	rm:'дельтоидов',
9311 	dm:'дельтоидам',
9312 	vm:'дельтоиды',
9313 	tm:'дельтоидами',
9314 	pm:'дельтоидах',
9315 	rod:0,
9316 	skl:2,
9317 	odu:0,
9318 };
9319 lx['день']={
9320 	ie:'день',
9321 	re:'дня',
9322 	de:'дню',
9323 	ve:'день',
9324 	te:'днём',
9325 	pe:'дне',
9326 	im:'дни',
9327 	rm:'дней',
9328 	dm:'дням',
9329 	vm:'дни',
9330 	tm:'днями',
9331 	pm:'днях',
9332 	rod:0,
9333 	skl:2,
9334 	odu:0,
9335 }; 
9336 lx['деревня']={
9337 	ie:'деревня',
9338 	re:'деревни',
9339 	de:'деревне',
9340 	ve:'деревню',
9341 	te:'деревней',
9342 	pe:'деревне',
9343 	im:'деревни',
9344 	rm:'деревень',
9345 	dm:'деревням',
9346 	vm:'деревни',
9347 	tm:'деревнями',
9348 	pm:'деревнях',
9349 	rod:1,
9350 	skl:1,
9351 	odu:0,
9352 };
9353 lx['деталь']={
9354 	ie:'деталь',
9355 	re:'детали',
9356 	de:'детали',
9357 	ve:'деталь',
9358 	te:'деталью',
9359 	pe:'детали',
9360 	im:'детали',
9361 	rm:'деталей',
9362 	dm:'деталям',
9363 	vm:'детали',
9364 	tm:'деталями',
9365 	pm:'деталях',
9366 	rod:1,
9367 	skl:3,
9368 	odu:0,
9369 };
9370 lx['дециметр']={
9371 	ie:'дециметр',
9372 	re:'дециметра',
9373 	de:'дециметру',
9374 	ve:'дециметр',
9375 	te:'дециметром',
9376 	pe:'дециметре',
9377 	im:'дециметры',
9378 	rm:'дециметров',
9379 	dm:'дециметрам',
9380 	vm:'дециметры',
9381 	tm:'дециметрами',
9382 	pm:'дециметрах',
9383 	rod:0,
9384 	skl:2,
9385 	odu:0,
9386 	skr:'дм',
9387 };
9388 lx['диагональ']={
9389 	ie:'диагональ',
9390 	re:'диагонали',
9391 	de:'диагонали',
9392 	ve:'диагональ',
9393 	te:'диагональю',
9394 	pe:'диагонали',
9395 	im:'диагонали',
9396 	rm:'диагоналей',
9397 	dm:'диагоналям',
9398 	vm:'диагонали',
9399 	tm:'диагоналями',
9400 	pm:'диагоналях',
9401 	rod:1,
9402 	skl:3,
9403 	odu:0,
9404 };
9405 lx['дизель']={
9406 	ie:'дизель',
9407 	re:'дизеля',
9408 	de:'дизелю',
9409 	ve:'дизель',
9410 	te:'дизелем',
9411 	pe:'дизеле',
9412 	im:'дизели',
9413 	rm:'дизелей',
9414 	dm:'дизелям',
9415 	vm:'дизели',
9416 	tm:'дизелями',
9417 	pm:'дизелях',
9418 	rod:0,
9419 	skl:2,
9420 	odu:0,
9421 };
9422 lx['доллар']={
9423 	ie:'доллар',
9424 	re:'доллара',
9425 	de:'доллару',
9426 	ve:'доллар',
9427 	te:'долларом',
9428 	pe:'долларе',
9429 	im:'доллары',
9430 	rm:'долларов',
9431 	dm:'долларам',
9432 	vm:'доллары',
9433 	tm:'долларами',
9434 	pm:'долларах',
9435 	rod:0,
9436 	skl:2,
9437 	odu:0,
9438 }; 
9439 lx['дом']={
9440 	ie:'дом',
9441 	re:'дома',
9442 	de:'дому',
9443 	ve:'дом',
9444 	te:'домом',
9445 	pe:'доме',
9446 	im:'дома',
9447 	rm:'домов',
9448 	dm:'домам',
9449 	vm:'дома',
9450 	tm:'домами',
9451 	pm:'домах',
9452 	rod:0,
9453 	skl:2,
9454 	odu:0,
9455 };
9456 lx['домик']={
9457 	ie:'домик',
9458 	re:'домика',
9459 	de:'домику',
9460 	ve:'домик',
9461 	te:'домиком',
9462 	pe:'домике',
9463 	im:'домики',
9464 	rm:'домиков',
9465 	dm:'домикам',
9466 	vm:'домики',
9467 	tm:'домиками',
9468 	pm:'домиках',
9469 	rod:0,
9470 	skl:2,
9471 	odu:0,
9472 };
9473 lx['дробь']={
9474 	ie:'дробь',
9475 	re:'дроби',
9476 	de:'дроби',
9477 	ve:'дробь',
9478 	te:'дробью',
9479 	pe:'дроби',
9480 	im:'дроби',
9481 	rm:'дробей',
9482 	dm:'дробям',
9483 	vm:'дроби',
9484 	tm:'дробями',
9485 	pm:'дробях',
9486 	rod:1,
9487 	skl:3,
9488 	odu:0,
9489 	chr:1,
9490 };
9491 lx['евро']={
9492 	ie:'евро',
9493 	re:'евро',
9494 	de:'евро',
9495 	ve:'евро',
9496 	te:'евро',
9497 	pe:'евро',
9498 	im:'евро',
9499 	rm:'евро',
9500 	dm:'евро',
9501 	vm:'евро',
9502 	tm:'евро',
9503 	pm:'евро',
9504 	rod:2,
9505 	skl:0,
9506 	odu:0,
9507 };
9508 lx['Елена']={
9509 	ie:'Елена',
9510 	re:'Елены',
9511 	de:'Елене',
9512 	ve:'Елену',
9513 	te:'Еленой',
9514 	pe:'Елене',
9515 	im:'Елены',
9516 	rm:'Елен',
9517 	dm:'Еленам',
9518 	vm:'Елен',
9519 	tm:'Еленами',
9520 	pm:'Еленах',
9521 	rod:1,
9522 	skl:1,
9523 	odu:0,
9524 };
9525 lx['жидкость']={
9526 	ie:'жидкость',
9527 	re:'жидкости',
9528 	de:'жидкости',
9529 	ve:'жидкость',
9530 	te:'жидкостью',
9531 	pe:'жидкости',
9532 	im:'жидкости',
9533 	rm:'жидкостей',
9534 	dm:'жидкостям',
9535 	vm:'жидкости',
9536 	tm:'жидкостями',
9537 	pm:'жидкостях',
9538 	rod:1,
9539 	skl:3,
9540 	odu:0,
9541 };
9542 lx['задание']={
9543 	ie:'задание',
9544 	re:'задания',
9545 	de:'заданию',
9546 	ve:'задание',
9547 	te:'заданием',
9548 	pe:'задании',
9549 	im:'задания',
9550 	rm:'заданий',
9551 	dm:'заданиям',
9552 	vm:'задания',
9553 	tm:'заданиями',
9554 	pm:'заданиях',
9555 	rod:2,
9556 	skl:2,
9557 	odu:0,
9558 };
9559 lx['"Запорожец"']={
9560 	ie:'"Запорожец"',
9561 	re:'"Запорожца"',
9562 	de:'"Запорожцу"',
9563 	ve:'"Запорожец"',
9564 	te:'"Запорожцем"',
9565 	pe:'"Запорожце"',
9566 	im:'"Запорожцы"',
9567 	rm:'"Запорожцев"',
9568 	dm:'"Запорожцам"',
9569 	vm:'"Запорожцы"',
9570 	tm:'"Запорожцами"',
9571 	pm:'"Запорожцах"',
9572 	rod:0,
9573 	skl:2,
9574 	odu:0,
9575 };
9576 lx['значение']={
9577 	ie:'значение',
9578 	re:'значения',
9579 	de:'значению',
9580 	ve:'значение',
9581 	te:'значением',
9582 	pe:'значении',
9583 	im:'значения',
9584 	rm:'значений',
9585 	dm:'значениям',
9586 	vm:'значения',
9587 	tm:'значениями',
9588 	pm:'значениях',
9589 	rod:2,
9590 	skl:2,
9591 	odu:0,
9592 };
9593 lx['Ивановна']={
9594 	ie:'Ивановна',
9595 	re:'Ивановны',
9596 	de:'Ивановне',
9597 	ve:'Ивановну',
9598 	te:'Ивановной',
9599 	pe:'Ивановне',
9600 	im:'Ивановны',
9601 	rm:'Ивановн',
9602 	dm:'Ивановнам',
9603 	vm:'Ивановн',
9604 	tm:'Ивановнами',
9605 	pm:'Ивановнах',
9606 	rod:1,
9607 	skl:1,
9608 	odu:0,
9609 };
9610 lx['известняк']={
9611 	ie:'известняк',
9612 	re:'известняка',
9613 	de:'известняку',
9614 	ve:'известняк',
9615 	te:'известняком',
9616 	pe:'известняке',
9617 	im:'известняки',
9618 	rm:'известняков',
9619 	dm:'известнякам',
9620 	vm:'известняки',
9621 	tm:'известняками',
9622 	pm:'известняках',
9623 	rod:0,
9624 	skl:2,
9625 	odu:0,
9626 };
9627 lx['Израиль']={
9628 	ie:'Израиль',
9629 	re:'Израиля',
9630 	de:'Израилю',
9631 	ve:'Израиль',
9632 	te:'Израилем',
9633 	pe:'Израиле',
9634 	im:'Израили',
9635 	rm:'Израилей',
9636 	dm:'Израилям',
9637 	vm:'Израили',
9638 	tm:'Израилями',
9639 	pm:'Израилях',
9640 	rod:0,
9641 	skl:2,
9642 	odu:0,
9643 };
9644 lx['инноград']={
9645 	ie:'инноград',
9646 	re:'иннограда',
9647 	de:'иннограду',
9648 	ve:'инноград',
9649 	te:'инноградом',
9650 	pe:'иннограде',
9651 	im:'иннограды',
9652 	rm:'инноградов',
9653 	dm:'инноградам',
9654 	vm:'иннограды',
9655 	tm:'инноградами',
9656 	pm:'инноградах',
9657 	rod:0,
9658 	skl:2,
9659 	odu:0,
9660 };
9661 lx['интервал']={
9662 	ie:'интервал',
9663 	re:'интервала',
9664 	de:'интервалу',
9665 	ve:'интервал',
9666 	te:'интервалом',
9667 	pe:'интервале',
9668 	im:'интервалы',
9669 	rm:'интервалов',
9670 	dm:'интервалам',
9671 	vm:'интервалы',
9672 	tm:'интервалами',
9673 	pm:'интервалах',
9674 	rod:0,
9675 	skl:2,
9676 	odu:0,
9677 };
9678 lx['июнь']={
9679 	ie:'июнь',
9680 	re:'июня',
9681 	de:'июню',
9682 	ve:'июнь',
9683 	te:'июнем',
9684 	pe:'июне',
9685 	im:'июни',
9686 	rm:'июней',
9687 	dm:'июням',
9688 	vm:'июни',
9689 	tm:'июнями',
9690 	pm:'июнях',
9691 	rod:0,
9692 	skl:2,
9693 	odu:0,
9694 };
9695 lx['июль']={
9696 	ie:'июль',
9697 	re:'июля',
9698 	de:'июлю',
9699 	ve:'июль',
9700 	te:'июлем',
9701 	pe:'июле',
9702 	im:'июли',
9703 	rm:'июлей',
9704 	dm:'июлям',
9705 	vm:'июли',
9706 	tm:'июлями',
9707 	pm:'июлях',
9708 	rod:0,
9709 	skl:2,
9710 	odu:0,
9711 };
9712 lx['кабельтов']={
9713 	ie:'кабельтов',
9714 	re:'кабельтова',
9715 	de:'кабельтову',
9716 	ve:'кабельтов',
9717 	te:'кабельтовым',
9718 	pe:'кабельтовом',
9719 	im:'кабельтовы',
9720 	rm:'кабельтовых',
9721 	dm:'кабельтовым',
9722 	vm:'кабельтовых',
9723 	tm:'кабельтовыми',
9724 	pm:'кабельтовых',
9725 	rod:0,
9726 	skl:2,
9727 	odu:0,
9728 };
9729 lx['Казань']={
9730         ie:'Казань',
9731         re:'Казани',
9732         de:'Казани',
9733         ve:'Казань',
9734         te:'Казанью',
9735         pe:'Казани',
9736         im:'Казани',
9737         rm:'Казаней',
9738         dm:'Казаням',
9739         vm:'Казани',
9740         tm:'Казанями',
9741         pm:'Казанях',
9742         rod:1,
9743         skl:3,
9744         odu:0,
9745 };
9746 lx['кальций']={
9747 	ie:'кальций',
9748 	re:'кальция',
9749 	de:'кальцию',
9750 	ve:'кальций',
9751 	te:'кальцием',
9752 	pe:'кальции',
9753 	im:'кальции',
9754 	rm:'кальциев',
9755 	dm:'кальциям',
9756 	vm:'кальции',
9757 	tm:'кальциями',
9758 	pm:'кальциях',
9759 	rod:0,
9760 	skl:2,
9761 	odu:0,
9762 };
9763 lx['камень']={
9764 	ie:'камень',
9765 	re:'камня',
9766 	de:'камню',
9767 	ve:'камень',
9768 	te:'камнем',
9769 	pe:'камне',
9770 	im:'камни',
9771 	rm:'камней',
9772 	dm:'камням',
9773 	vm:'камни',
9774 	tm:'камнями',
9775 	pm:'камнях',
9776 	rod:0,
9777 	skl:2,
9778 	odu:0,
9779 };
9780 lx['канцелярия']={
9781 	ie:'канцелярия',
9782 	re:'канцелярии',
9783 	de:'канцелярии',
9784 	ve:'канцелярию',
9785 	te:'канцелярией',
9786 	pe:'канцелярии',
9787 	im:'канцелярии',
9788 	rm:'канцелярий',
9789 	dm:'канцеляриям',
9790 	vm:'канцелярии',
9791 	tm:'канцеляриями',
9792 	pm:'канцеляриях',
9793 	rod:1,
9794 	skl:1,
9795 	odu:0,
9796 };
9797 lx['катет']={
9798 	ie:'катет',
9799 	re:'катета',
9800 	de:'катету',
9801 	ve:'катет',
9802 	te:'катетом',
9803 	pe:'катете',
9804 	im:'катеты',
9805 	rm:'катетов',
9806 	dm:'катетам',
9807 	vm:'катеты',
9808 	tm:'катетами',
9809 	pm:'катетах',
9810 	rod:0,
9811 	skl:2,
9812 	odu:0,
9813 };
9814 lx['квадрат']={
9815 	ie:'квадрат',
9816 	re:'квадрата',
9817 	de:'квадрату',
9818 	ve:'квадрат',
9819 	te:'квадратом',
9820 	pe:'квадрате',
9821 	im:'квадраты',
9822 	rm:'квадратов',
9823 	dm:'квадратам',
9824 	vm:'квадраты',
9825 	tm:'квадратами',
9826 	pm:'квадратах',
9827 	rod:0,
9828 	skl:2,
9829 	odu:0,
9830 };
9831 lx['керосин']={
9832 	ie:'керосин',
9833 	re:'керосина',
9834 	de:'керосину',
9835 	ve:'керосин',
9836 	te:'керосином',
9837 	pe:'керосине',
9838 	im:'керосины',
9839 	rm:'керосинов',
9840 	dm:'керосинам',
9841 	vm:'керосины',
9842 	tm:'керосинами',
9843 	pm:'керосинах',
9844 	rod:0,
9845 	skl:2,
9846 	odu:0,
9847 };
9848 lx['километр']={
9849 	ie:'километр',
9850 	re:'километра',
9851 	de:'километру',
9852 	ve:'километр',
9853 	te:'километром',
9854 	pe:'километре',
9855 	im:'километры',
9856 	rm:'километров',
9857 	dm:'километрам',
9858 	vm:'километры',
9859 	tm:'километрами',
9860 	pm:'километрах',
9861 	rod:0,
9862 	skl:2,
9863 	odu:0,
9864 	skr:'км',
9865 };
9866 lx['Китай']={
9867 	ie:'Китай',
9868 	re:'Китая',
9869 	de:'Китаю',
9870 	ve:'Китай',
9871 	te:'Китаем',
9872 	pe:'Китае',
9873 	im:'Китаи',
9874 	rm:'Китаев',
9875 	dm:'Китаям',
9876 	vm:'Китаи',
9877 	tm:'Китаями',
9878 	pm:'Китаях',
9879 	rod:0,
9880 	skl:2,
9881 	odu:0,
9882 };
9883 lx['клавиатура']={
9884 	ie:'клавиатура',
9885 	re:'клавиатуры',
9886 	de:'клавиатуре',
9887 	ve:'клавиатуру',
9888 	te:'клавиатурой',
9889 	pe:'клавиатуре',
9890 	im:'клавиатуры',
9891 	rm:'клавиатур',
9892 	dm:'клавиатурам',
9893 	vm:'клавиатуры',
9894 	tm:'клавиатурами',
9895 	pm:'клавиатурах',
9896 	rod:1,
9897 	skl:1,
9898 	odu:0,
9899 	sbs:0,
9900 	chr:1,
9901 };
9902 lx['компакт-диск']={
9903 	ie:'компакт-диск',
9904 	re:'компакт-диска',
9905 	de:'компакт-диску',
9906 	ve:'компакт-диск',
9907 	te:'компакт-диском',
9908 	pe:'компакт-диске',
9909 	im:'компакт-диски',
9910 	rm:'компакт-дисков',
9911 	dm:'компакт-дискам',
9912 	vm:'компакт-диски',
9913 	tm:'компакт-дисками',
9914 	pm:'компакт-дисках',
9915 	rod:0,
9916 	skl:2,
9917 	odu:0,
9918 };
9919 lx['конструкция']={
9920 	ie:'конструкция',
9921 	re:'конструкции',
9922 	de:'конструкции',
9923 	ve:'конструкцию',
9924 	te:'конструкцией',
9925 	pe:'конструкции',
9926 	im:'конструкции',
9927 	rm:'конструкций',
9928 	dm:'конструкциям',
9929 	vm:'конструкции',
9930 	tm:'конструкциями',
9931 	pm:'конструкциях',
9932 	rod:1,
9933 	skl:1,
9934 	odu:0,
9935 };
9936 lx['копейка']={
9937 	ie:'копейка',
9938 	re:'копейки',
9939 	de:'копейке',
9940 	ve:'копейку',
9941 	te:'копейкой',
9942 	pe:'копейке',
9943 	im:'копейки',
9944 	rm:'копеек',
9945 	dm:'копейкам',
9946 	vm:'копейки',
9947 	tm:'копейками',
9948 	pm:'копейках',
9949 	rod:1,
9950 	skl:1,
9951 	odu:0,
9952 	sbs:0,
9953 	chr:1,
9954 };
9955 lx['корабль']={
9956 	ie:'корабль',
9957 	re:'корабля',
9958 	de:'кораблю',
9959 	ve:'корабль',
9960 	te:'кораблём',
9961 	pe:'корабле',
9962 	im:'корабли',
9963 	rm:'кораблей',
9964 	dm:'кораблям',
9965 	vm:'корабли',
9966 	tm:'кораблями',
9967 	pm:'кораблях',
9968 	rod:0,
9969 	skl:2,
9970 	odu:0,
9971 };
9972 lx['Красноярск']={
9973 	ie:'Красноярск',
9974 	re:'Красноярска',
9975 	de:'Красноярску',
9976 	ve:'Красноярск',
9977 	te:'Красноярском',
9978 	pe:'Красноярске',
9979 	im:'Красноярски',
9980 	rm:'Красноярсков',
9981 	dm:'Красноярскам',
9982 	vm:'Красноярски',
9983 	tm:'Красноярсками',
9984 	pm:'Красноярсках',
9985 	rod:0,
9986 	skl:2,
9987 	odu:0,
9988 };
9989 lx['Кристина']={
9990 	ie:'Кристина',
9991 	re:'Кристины',
9992 	de:'Кристине',
9993 	ve:'Кристину',
9994 	te:'Кристиной',
9995 	pe:'Кристине',
9996 	im:'Кристины',
9997 	rm:'Кристин',
9998 	dm:'Кристинам',
9999 	vm:'Кристин',
10000 	tm:'Кристинами',
10001 	pm:'Кристинах',
10002 	rod:1,
10003 	skl:1,
10004 	odu:0,
10005 };
10006 lx['Куба']={
10007 	ie:'Куба',
10008 	re:'Кубы',
10009 	de:'Кубе',
10010 	ve:'Кубу',
10011 	te:'Кубой',
10012 	pe:'Кубе',
10013 	im:'Кубы',
10014 	rm:'Куб',
10015 	dm:'Кубам',
10016 	vm:'Кубы',
10017 	tm:'Кубами',
10018 	pm:'Кубах',
10019 	rod:1,
10020 	skl:1,
10021 	odu:0,
10022 };
10023 lx['кубометр']={
10024 	ie:'кубометр',
10025 	re:'кубометра',
10026 	de:'кубометру',
10027 	ve:'кубометр',
10028 	te:'кубометром',
10029 	pe:'кубометре',
10030 	im:'кубометры',
10031 	rm:'кубометров',
10032 	dm:'кубометрам',
10033 	vm:'кубометры',
10034 	tm:'кубометрами',
10035 	pm:'кубометрах',
10036 	rod:0,
10037 	skl:2,
10038 	odu:0,
10039 };
10040 lx['литр']={
10041 	ie:'литр',
10042 	re:'литра',
10043 	de:'литру',
10044 	ve:'литр',
10045 	te:'литром',
10046 	pe:'литре',
10047 	im:'литры',
10048 	rm:'литров',
10049 	dm:'литрам',
10050 	vm:'литры',
10051 	tm:'литрами',
10052 	pm:'литрах',
10053 	rod:0,
10054 	skl:2,
10055 	odu:0,
10056 }; 
10057 lx['луч']={
10058 	ie:'луч',
10059 	re:'луча',
10060 	de:'лучу',
10061 	ve:'луч',
10062 	te:'лучом',
10063 	pe:'луче',
10064 	im:'лучи',
10065 	rm:'лучей',
10066 	dm:'лучам',
10067 	vm:'лучи',
10068 	tm:'лучами',
10069 	pm:'лучах',
10070 	rod:0,
10071 	skl:2,
10072 	odu:0,
10073 };
10074 lx['Магадан']={
10075 	ie:'Магадан',
10076 	re:'Магадана',
10077 	de:'Магадану',
10078 	ve:'Магадан',
10079 	te:'Магаданом',
10080 	pe:'Магадане',
10081 	im:'Магаданы',
10082 	rm:'Магаданов',
10083 	dm:'Магаданам',
10084 	vm:'Магаданы',
10085 	tm:'Магаданами',
10086 	pm:'Магаданах',
10087 	rod:0,
10088 	skl:2,
10089 	odu:0,
10090 };
10091 lx['магазин']={
10092 	ie:'магазин',
10093 	re:'магазина',
10094 	de:'магазину',
10095 	ve:'магазин',
10096 	te:'магазином',
10097 	pe:'магазине',
10098 	im:'магазины',
10099 	rm:'магазинов',
10100 	dm:'магазинам',
10101 	vm:'магазины',
10102 	tm:'магазинами',
10103 	pm:'магазинах',
10104 	rod:0,
10105 	skl:2,
10106 	odu:0,
10107 };
10108 lx['магия']={
10109 	ie:'магия',
10110 	re:'магии',
10111 	de:'магии',
10112 	ve:'магию',
10113 	te:'магией',
10114 	pe:'магии',
10115 	im:'магии',
10116 	rm:'магий',
10117 	dm:'магиям',
10118 	vm:'магии',
10119 	tm:'магиями',
10120 	pm:'магиях',
10121 	rod:1,
10122 	skl:1,
10123 	odu:0,
10124 };
10125 lx['май']={
10126 	ie:'май',
10127 	re:'мая',
10128 	de:'маю',
10129 	ve:'май',
10130 	te:'маем',
10131 	pe:'мае',
10132 	im:'маи',
10133 	rm:'маев',
10134 	dm:'маям',
10135 	vm:'маи',
10136 	tm:'маями',
10137 	pm:'маях',
10138 	rod:0,
10139 	skl:2,
10140 	odu:0,
10141 };
10142 lx['Мария']={
10143 	ie:'Мария',
10144 	re:'Марии',
10145 	de:'Марии',
10146 	ve:'Марию',
10147 	te:'Марией',
10148 	pe:'Марии',
10149 	im:'Марии',
10150 	rm:'Марий',
10151 	dm:'Мариям',
10152 	vm:'Марии',
10153 	tm:'Мариями',
10154 	pm:'Мариях',
10155 	rod:1,
10156 	skl:1,
10157 	odu:0,
10158 };
10159 lx['март']={
10160 	ie:'март',
10161 	re:'марта',
10162 	de:'марту',
10163 	ve:'март',
10164 	te:'мартом',
10165 	pe:'марте',
10166 	im:'марты',
10167 	rm:'мартов',
10168 	dm:'мартам',
10169 	vm:'марты',
10170 	tm:'мартами',
10171 	pm:'мартах',
10172 	rod:0,
10173 	skl:2,
10174 	odu:0,
10175 };
10176 lx['матрёшка']={
10177 	ie:'матрёшка',
10178 	re:'матрёшки',
10179 	de:'матрёшке',
10180 	ve:'матрёшку',
10181 	te:'матрёшкой',
10182 	pe:'матрёшке',
10183 	im:'матрёшки',
10184 	rm:'матрёшек',
10185 	dm:'матрёшкам',
10186 	vm:'матрёшки',
10187 	tm:'матрёшками',
10188 	pm:'матрёшках',
10189 	rod:1,
10190 	skl:1,
10191 	odu:0,
10192 };
10193 lx['Мексика']={
10194 	ie:'Мексика',
10195 	re:'Мексики',
10196 	de:'Мексике',
10197 	ve:'Мексику',
10198 	te:'Мексикой',
10199 	pe:'Мексике',
10200 	im:'Мексики',
10201 	rm:'Мексик',
10202 	dm:'Мексикам',
10203 	vm:'Мексики',
10204 	tm:'Мексиками',
10205 	pm:'Мексиках',
10206 	rod:1,
10207 	skl:1,
10208 	odu:0,
10209 };
10210 lx['меню']={
10211 	ie:'меню',
10212 	re:'меню',
10213 	de:'меню',
10214 	ve:'меню',
10215 	te:'меню',
10216 	pe:'меню',
10217 	im:'меню',
10218 	rm:'меню',
10219 	dm:'меню',
10220 	vm:'меню',
10221 	tm:'меню',
10222 	pm:'меню',
10223 	rod:2,
10224 	skl:0,
10225 	odu:0,
10226 };
10227 lx['месяц']={
10228 	ie:'месяц',
10229 	re:'месяца',
10230 	de:'месяцу',
10231 	ve:'месяц',
10232 	te:'месяцем',
10233 	pe:'месяце',
10234 	im:'месяцы',
10235 	rm:'месяцев',
10236 	dm:'месяцам',
10237 	vm:'месяцы',
10238 	tm:'месяцами',
10239 	pm:'месяцах',
10240 	rod:0,
10241 	skl:2,
10242 	odu:0,
10243 };
10244 lx['метр']={
10245 	ie:'метр',
10246 	re:'метра',
10247 	de:'метру',
10248 	ve:'метр',
10249 	te:'метром',
10250 	pe:'метре',
10251 	im:'метры',
10252 	rm:'метров',
10253 	dm:'метрам',
10254 	vm:'метры',
10255 	tm:'метрами',
10256 	pm:'метрах',
10257 	rod:0,
10258 	skl:2,
10259 	odu:0,
10260 	skr:'м',
10261 };
10262 lx['мешок']={
10263 	ie:'мешок',
10264 	re:'мешка',
10265 	de:'мешку',
10266 	ve:'мешок',
10267 	te:'мешком',
10268 	pe:'мешке',
10269 	im:'мешки',
10270 	rm:'мешков',
10271 	dm:'мешкам',
10272 	vm:'мешки',
10273 	tm:'мешками',
10274 	pm:'мешках',
10275 	rod:0,
10276 	skl:2,
10277 	odu:0,
10278 };
10279 lx['миллиметр']={
10280 	ie:'миллиметр',
10281 	re:'миллиметра',
10282 	de:'миллиметру',
10283 	ve:'миллиметр',
10284 	te:'миллиметром',
10285 	pe:'миллиметре',
10286 	im:'миллиметры',
10287 	rm:'миллиметров',
10288 	dm:'миллиметрам',
10289 	vm:'миллиметры',
10290 	tm:'миллиметрами',
10291 	pm:'миллиметрах',
10292 	rod:0,
10293 	skl:2,
10294 	odu:0,
10295 	skr:'мм',
10296 };
10297 lx['министерство']={
10298 	ie:'министерство',
10299 	re:'министерства',
10300 	de:'министерству',
10301 	ve:'министерство',
10302 	te:'министерством',
10303 	pe:'министерстве',
10304 	im:'министерства',
10305 	rm:'министерств',
10306 	dm:'министерствам',
10307 	vm:'министерства',
10308 	tm:'министерствами',
10309 	pm:'министерствах',
10310 	rod:2,
10311 	skl:2,
10312 	odu:0,
10313 };
10314 lx['Минобрнауки']={
10315 	ie:'Минобрнауки',
10316 	re:'Минобрнауки',
10317 	de:'Минобрнауки',
10318 	ve:'Минобрнауки',
10319 	te:'Минобрнауки',
10320 	pe:'Минобрнауки',
10321 	im:'Минобрнауки',
10322 	rm:'Минобрнауки',
10323 	dm:'Минобрнауки',
10324 	vm:'Минобрнауки',
10325 	tm:'Минобрнауки',
10326 	pm:'Минобрнауки',
10327 	rod:2,
10328 	skl:0,
10329 	odu:0,
10330 };
10331 lx['минута']={
10332 	ie:'минута',
10333 	re:'минуты',
10334 	de:'минуте',
10335 	ve:'минуту',
10336 	te:'минутой',
10337 	pe:'минуте',
10338 	im:'минуты',
10339 	rm:'минут',
10340 	dm:'минутам',
10341 	vm:'минуты',
10342 	tm:'минутами',
10343 	pm:'минутах',
10344 	rod:1,
10345 	skl:1,
10346 	odu:0,
10347 };
10348 lx['Москва']={
10349 	ie:'Москва',
10350 	re:'Москвы',
10351 	de:'Москве',
10352 	ve:'Москву',
10353 	te:'Москвой',
10354 	pe:'Москве',
10355 	im:'Москвы',
10356 	rm:'Москв',
10357 	dm:'Москвам',
10358 	vm:'Москвы',
10359 	tm:'Москвами',
10360 	pm:'Москвах',
10361 	rod:1,
10362 	skl:1,
10363 	odu:0,
10364 	sbs:1,
10365 	chr:1,
10366 };
10367 lx['"Москвич"']={
10368 	ie:'"Москвич"',
10369 	re:'"Москвича"',
10370 	de:'"Москвичу"',
10371 	ve:'"Москвич"',
10372 	te:'"Москвичом"',
10373 	pe:'"Москвиче"',
10374 	im:'"Москвичи"',
10375 	rm:'"Москвичей"',
10376 	dm:'"Москвичам"',
10377 	vm:'"Москвичи"',
10378 	tm:'"Москвичами"',
10379 	pm:'"Москвичах"',
10380 	rod:0,
10381 	skl:2,
10382 	odu:0,
10383 };
10384 lx['наукоград']={
10385 	ie:'наукоград',
10386 	re:'наукограда',
10387 	de:'наукограду',
10388 	ve:'наукоград',
10389 	te:'наукоградом',
10390 	pe:'наукограде',
10391 	im:'наукограды',
10392 	rm:'наукоградов',
10393 	dm:'наукоградам',
10394 	vm:'наукограды',
10395 	tm:'наукоградами',
10396 	pm:'наукоградах',
10397 	rod:0,
10398 	skl:2,
10399 	odu:0,
10400 };
10401 lx['неделя']={
10402 	ie:'неделя',
10403 	re:'недели',
10404 	de:'неделе',
10405 	ve:'неделю',
10406 	te:'неделей',
10407 	pe:'неделе',
10408 	im:'недели',
10409 	rm:'недель',
10410 	dm:'неделям',
10411 	vm:'недели',
10412 	tm:'неделями',
10413 	pm:'неделях',
10414 	rod:1,
10415 	skl:1,
10416 	odu:0,
10417 };
10418 lx['Николаевна']={
10419 	ie:'Николаевна',
10420 	re:'Николаевны',
10421 	de:'Николаевне',
10422 	ve:'Николаевну',
10423 	te:'Николаевной',
10424 	pe:'Николаевне',
10425 	im:'Николаевны',
10426 	rm:'Николаевн',
10427 	dm:'Николаевнам',
10428 	vm:'Николаевн',
10429 	tm:'Николаевнами',
10430 	pm:'Николаевнах',
10431 	rod:1,
10432 	skl:1,
10433 	odu:0,
10434 };
10435 lx['ноябрь']={
10436 	ie:'ноябрь',
10437 	re:'ноября',
10438 	de:'ноябрю',
10439 	ve:'ноябрь',
10440 	te:'ноябрём',
10441 	pe:'ноябре',
10442 	im:'ноябри',
10443 	rm:'ноябрей',
10444 	dm:'ноябрям',
10445 	vm:'ноябри',
10446 	tm:'ноябрями',
10447 	pm:'ноябрях',
10448 	rod:0,
10449 	skl:2,
10450 	odu:0,
10451 };
10452 lx['октябрь']={
10453 	ie:'октябрь',
10454 	re:'октября',
10455 	de:'октябрю',
10456 	ve:'октябрь',
10457 	te:'октябрём',
10458 	pe:'октябре',
10459 	im:'октябри',
10460 	rm:'октябрей',
10461 	dm:'октябрям',
10462 	vm:'октябри',
10463 	tm:'октябрями',
10464 	pm:'октябрях',
10465 	rod:0,
10466 	skl:2,
10467 	odu:0,
10468 };
10469 lx['Олеся']={
10470 	ie:'Олеся',
10471 	re:'Олеси',
10472 	de:'Олесе',
10473 	ve:'Олесю',
10474 	te:'Олесей',
10475 	pe:'Олесе',
10476 	im:'Олеси',
10477 	rm:'Олесь',
10478 	dm:'Олесям',
10479 	vm:'Олесь',
10480 	tm:'Олесями',
10481 	pm:'Олесях',
10482 	rod:1,
10483 	skl:1,
10484 	odu:0,
10485 };
10486 lx['Ольга']={
10487 	ie:'Ольга',
10488 	re:'Ольги',
10489 	de:'Ольге',
10490 	ve:'Ольгу',
10491 	te:'Ольгой',
10492 	pe:'Ольге',
10493 	im:'Ольги',
10494 	rm:'Ольг',
10495 	dm:'Ольгам',
10496 	vm:'Ольг',
10497 	tm:'Ольгами',
10498 	pm:'Ольгах',
10499 	rod:1,
10500 	skl:1,
10501 	odu:0,
10502 };
10503 lx['отрезок']={
10504 	ie:'отрезок',
10505 	re:'отрезка',
10506 	de:'отрезку',
10507 	ve:'отрезок',
10508 	te:'отрезком',
10509 	pe:'отрезке',
10510 	im:'отрезки',
10511 	rm:'отрезков',
10512 	dm:'отрезкам',
10513 	vm:'отрезки',
10514 	tm:'отрезками',
10515 	pm:'отрезках',
10516 	rod:0,
10517 	skl:2,
10518 	odu:0,
10519 };
10520 lx['офис']={
10521 	ie:'офис',
10522 	re:'офиса',
10523 	de:'офису',
10524 	ve:'офис',
10525 	te:'офисом',
10526 	pe:'офисе',
10527 	im:'офисы',
10528 	rm:'офисов',
10529 	dm:'офисам',
10530 	vm:'офисы',
10531 	tm:'офисами',
10532 	pm:'офисах',
10533 	rod:0,
10534 	skl:2,
10535 	odu:0,
10536 };
10537 lx['параллелограмм']={
10538 	ie:'параллелограмм',
10539 	re:'параллелограмма',
10540 	de:'параллелограмму',
10541 	ve:'параллелограмм',
10542 	te:'параллелограммом',
10543 	pe:'параллелограмме',
10544 	im:'параллелограммы',
10545 	rm:'параллелограммов',
10546 	dm:'параллелограммам',
10547 	vm:'параллелограммы',
10548 	tm:'параллелограммами',
10549 	pm:'параллелограммах',
10550 	rod:0,
10551 	skl:2,
10552 	odu:0,
10553 };
10554 lx['пароход']={
10555 	ie:'пароход',
10556 	re:'парохода',
10557 	de:'пароходу',
10558 	ve:'пароход',
10559 	te:'пароходом',
10560 	pe:'пароходе',
10561 	im:'пароходы',
10562 	rm:'пароходов',
10563 	dm:'пароходам',
10564 	vm:'пароходы',
10565 	tm:'пароходами',
10566 	pm:'пароходах',
10567 	rod:0,
10568 	skl:2,
10569 	odu:0,
10570 };
10571 lx['ПГТ']={
10572 	ie:'ПГТ',
10573 	re:'ПГТ',
10574 	de:'ПГТ',
10575 	ve:'ПГТ',
10576 	te:'ПГТ',
10577 	pe:'ПГТ',
10578 	im:'ПГТ',
10579 	rm:'ПГТ',
10580 	dm:'ПГТ',
10581 	vm:'ПГТ',
10582 	tm:'ПГТ',
10583 	pm:'ПГТ',
10584 	rod:0,
10585 	skl:0,
10586 	odu:0,
10587 };
10588 lx['пенобетон']={
10589 	ie:'пенобетон',
10590 	re:'пенобетона',
10591 	de:'пенобетону',
10592 	ve:'пенобетон',
10593 	te:'пенобетоном',
10594 	pe:'пенобетоне',
10595 	im:'пенобетоны',
10596 	rm:'пенобетонов',
10597 	dm:'пенобетонам',
10598 	vm:'пенобетоны',
10599 	tm:'пенобетонами',
10600 	pm:'пенобетонах',
10601 	rod:0,
10602 	skl:2,
10603 	odu:0,
10604 };
10605 lx['песок']={
10606 	ie:'песок',
10607 	re:'песка',
10608 	de:'песку',
10609 	ve:'песок',
10610 	te:'песком',
10611 	pe:'песке',
10612 	im:'пески',
10613 	rm:'песков',
10614 	dm:'пескам',
10615 	vm:'пески',
10616 	tm:'песками',
10617 	pm:'песках',
10618 	rod:0,
10619 	skl:2,
10620 	odu:0,
10621 };
10622 lx['песчаник']={
10623 	ie:'песчаник',
10624 	re:'песчаника',
10625 	de:'песчанику',
10626 	ve:'песчаник',
10627 	te:'песчаником',
10628 	pe:'песчанике',
10629 	im:'песчаники',
10630 	rm:'песчаников',
10631 	dm:'песчаникам',
10632 	vm:'песчаники',
10633 	tm:'песчаниками',
10634 	pm:'песчаниках',
10635 	rod:0,
10636 	skl:2,
10637 	odu:0,
10638 };
10639 lx['Петровна']={
10640 	ie:'Петровна',
10641 	re:'Петровны',
10642 	de:'Петровне',
10643 	ve:'Петровну',
10644 	te:'Петровной',
10645 	pe:'Петровне',
10646 	im:'Петровны',
10647 	rm:'Петровн',
10648 	dm:'Петровнам',
10649 	vm:'Петровн',
10650 	tm:'Петровнами',
10651 	pm:'Петровнах',
10652 	rod:1,
10653 	skl:1,
10654 	odu:0,
10655 };
10656 lx['пирожок']={
10657 	ie:'пирожок',
10658 	re:'пирожка',
10659 	de:'пирожку',
10660 	ve:'пирожок',
10661 	te:'пирожком',
10662 	pe:'пирожке',
10663 	im:'пирожки',
10664 	rm:'пирожков',
10665 	dm:'пирожкам',
10666 	vm:'пирожки',
10667 	tm:'пирожами',
10668 	pm:'пирожах',
10669 	rod:0,
10670 	skl:2,
10671 	odu:0,
10672 };
10673 lx['поезд']={
10674 	ie:'поезд',
10675 	re:'поезда',
10676 	de:'поезду',
10677 	ve:'поезд',
10678 	te:'поездом',
10679 	pe:'поезде',
10680 	im:'поезды',
10681 	rm:'поездов',
10682 	dm:'поездам',
10683 	vm:'поезды',
10684 	tm:'поездами',
10685 	pm:'поездах',
10686 	rod:0,
10687 	skl:2,
10688 	odu:0,
10689 };
10690 lx['полуинтервал']={
10691 	ie:'полуинтервал',
10692 	re:'полуинтервала',
10693 	de:'полуинтервалу',
10694 	ve:'полуинтервал',
10695 	te:'полуинтервалом',
10696 	pe:'полуинтервале',
10697 	im:'полуинтервалы',
10698 	rm:'полуинтервалов',
10699 	dm:'полуинтервалам',
10700 	vm:'полуинтервалы',
10701 	tm:'полуинтервалами',
10702 	pm:'полуинтервалах',
10703 	rod:0,
10704 	skl:2,
10705 	odu:0,
10706 };
10707 lx['Польша']={
10708 	ie:'Польша',
10709 	re:'Польши',
10710 	de:'Польше',
10711 	ve:'Польшу',
10712 	te:'Польшой',
10713 	pe:'Польше',
10714 	im:'Польши',
10715 	rm:'Польш',
10716 	dm:'Польшам',
10717 	vm:'Польши',
10718 	tm:'Польшами',
10719 	pm:'Польшах',
10720 	rod:1,
10721 	skl:1,
10722 	odu:0,
10723 };
10724 lx['понедельник']={
10725 	ie:'понедельник',
10726 	re:'понедельника',
10727 	de:'понедельнику',
10728 	ve:'понедельник',
10729 	te:'понедельником',
10730 	pe:'понедельнике',
10731 	im:'понедельники',
10732 	rm:'понедельников',
10733 	dm:'понедельникам',
10734 	vm:'понедельники',
10735 	tm:'понедельниками',
10736 	pm:'понедельниках',
10737 	rod:0,
10738 	skl:2,
10739 	odu:0,
10740 };
10741 lx['посёлок']={
10742 	ie:'посёлок',
10743 	re:'посёлка',
10744 	de:'посёлку',
10745 	ve:'посёлок',
10746 	te:'посёлком',
10747 	pe:'посёлке',
10748 	im:'посёлки',
10749 	rm:'посёлков',
10750 	dm:'посёлкам',
10751 	vm:'посёлки',
10752 	tm:'посёлками',
10753 	pm:'посёлках',
10754 	rod:0,
10755 	skl:2,
10756 	odu:0,
10757 };
10758 lx['программистка']={
10759 	ie:'программистка',
10760 	re:'программистки',
10761 	de:'программистке',
10762 	ve:'программистку',
10763 	te:'программисткой',
10764 	pe:'программистке',
10765 	im:'программистки',
10766 	rm:'программисток',
10767 	dm:'программисткам',
10768 	vm:'программисток',
10769 	tm:'программистками',
10770 	pm:'программистках',
10771 	rod:1,
10772 	skl:1,
10773 	odu:0,
10774 };
10775 lx['промежуток']={
10776 	ie:'промежуток',
10777 	re:'промежутка',
10778 	de:'промежутку',
10779 	ve:'промежуток',
10780 	te:'промежутком',
10781 	pe:'промежутке',
10782 	im:'промежутки',
10783 	rm:'промежутков',
10784 	dm:'промежуткам',
10785 	vm:'промежутки',
10786 	tm:'промежутками',
10787 	pm:'промежутках',
10788 	rod:0,
10789 	skl:2,
10790 	odu:0,
10791 };
10792 lx['прямоугольник']={
10793 	ie:'прямоугольник',
10794 	re:'прямоугольника',
10795 	de:'прямоугольнику',
10796 	ve:'прямоугольник',
10797 	te:'прямоугольником',
10798 	pe:'прямоугольнике',
10799 	im:'прямоугольники',
10800 	rm:'прямоугольников',
10801 	dm:'прямоугольникам',
10802 	vm:'прямоугольники',
10803 	tm:'прямоугольниками',
10804 	pm:'прямоугольниках',
10805 	rod:0,
10806 	skl:2,
10807 	odu:0,
10808 };
10809 lx['пункт']={
10810 	ie:'пункт',
10811 	re:'пункта',
10812 	de:'пункту',
10813 	ve:'пункт',
10814 	te:'пунктом',
10815 	pe:'пункте',
10816 	im:'пункты',
10817 	rm:'пунктов',
10818 	dm:'пунктам',
10819 	vm:'пункты',
10820 	tm:'пунктами',
10821 	pm:'пунктах',
10822 	rod:0,
10823 	skl:2,
10824 	odu:0,
10825 };
10826 lx['путь']={
10827 	ie:'путь',
10828 	re:'пути',
10829 	de:'пути',
10830 	ve:'путь',
10831 	te:'путём',
10832 	pe:'пути',
10833 	im:'пути',
10834 	rm:'путей',
10835 	dm:'путям',
10836 	vm:'пути',
10837 	tm:'путями',
10838 	pm:'путях',
10839 	rod:0,
10840 	skl:2,
10841 	odu:0,
10842 };
10843 lx['пятница']={
10844 	ie:'пятница',
10845 	re:'пятницы',
10846 	de:'пятнице',
10847 	ve:'пятницу',
10848 	te:'пятницей',
10849 	pe:'пятнице',
10850 	im:'пятницы',
10851 	rm:'пятниц',
10852 	dm:'пятницам',
10853 	vm:'пятницы',
10854 	tm:'пятницами',
10855 	pm:'пятницах',
10856 	rod:1,
10857 	skl:1,
10858 	odu:0,
10859 };
10860 lx['раствор']={
10861 	ie:'раствор',
10862 	re:'раствора',
10863 	de:'раствору',
10864 	ve:'раствор',
10865 	te:'раствором',
10866 	pe:'растворе',
10867 	im:'растворы',
10868 	rm:'растворов',
10869 	dm:'растворам',
10870 	vm:'растворы',
10871 	tm:'растворами',
10872 	pm:'растворах',
10873 	rod:0,
10874 	skl:2,
10875 	odu:0,
10876 };
10877 lx['ребёнок']={
10878 	ie:'ребёнок',
10879 	re:'ребёнка',
10880 	de:'ребёнку',
10881 	ve:'ребёнка',
10882 	te:'ребёнком',
10883 	pe:'ребёнке',
10884 	im:'ребята',
10885 	rm:'ребят',
10886 	dm:'ребятам',
10887 	vm:'ребят',
10888 	tm:'ребятами',
10889 	pm:'ребятах',
10890 	rod:0,
10891 	skl:2,
10892 	odu:1,
10893 	sbs:0,
10894 	chr:1,
10895 };
10896 lx['ромб']={
10897 	ie:'ромб',
10898 	re:'ромба',
10899 	de:'ромбу',
10900 	ve:'ромб',
10901 	te:'ромбом',
10902 	pe:'ромбе',
10903 	im:'ромбы',
10904 	rm:'ромбов',
10905 	dm:'ромбам',
10906 	vm:'ромбы',
10907 	tm:'ромбами',
10908 	pm:'ромбах',
10909 	rod:0,
10910 	skl:2,
10911 	odu:0,
10912 };
10913 lx['Рособрнадзор']={
10914 	ie:'Рособрнадзор',
10915 	re:'Рособрнадзора',
10916 	de:'Рособрнадзору',
10917 	ve:'Рособрнадзор',
10918 	te:'Рособрнадзором',
10919 	pe:'Рособрнадзоре',
10920 	im:'Рособрнадзоры',
10921 	rm:'Рособрнадзоров',
10922 	dm:'Рособрнадзорам',
10923 	vm:'Рособрнадзоры',
10924 	tm:'Рособрнадзорами',
10925 	pm:'Рособрнадзорах',
10926 	rod:0,
10927 	skl:2,
10928 	odu:0,
10929 };
10930 lx['Россия']={
10931 	ie:'Россия',
10932 	re:'России',
10933 	de:'России',
10934 	ve:'Россию',
10935 	te:'Россией',
10936 	pe:'России',
10937 	im:'России',
10938 	rm:'Россий',
10939 	dm:'Россиям',
10940 	vm:'России',
10941 	tm:'Россиями',
10942 	pm:'Россиях',
10943 	rod:1,
10944 	skl:1,
10945 	odu:0,
10946 };
10947 lx['ртуть']={
10948 	ie:'ртуть',
10949 	re:'ртути',
10950 	de:'ртути',
10951 	ve:'ртуть',
10952 	te:'ртутью',
10953 	pe:'ртути',
10954 	im:'ртути',
10955 	rm:'ртутей',
10956 	dm:'ртутям',
10957 	vm:'ртути',
10958 	tm:'ртутями',
10959 	pm:'ртутях',
10960 	rod:1,
10961 	skl:3,
10962 	odu:0,
10963 };
10964 lx['рубль']={
10965 	ie:'рубль',
10966 	re:'рубля',
10967 	de:'рублю',
10968 	ve:'рубль',
10969 	te:'рублём',
10970 	pe:'рубле',
10971 	im:'рубли',
10972 	rm:'рублей',
10973 	dm:'рублям',
10974 	vm:'рубли',
10975 	tm:'рублями',
10976 	pm:'рублях',
10977 	rod:0,
10978 	skl:2,
10979 	odu:0,
10980 };
10981 lx['рука']={
10982 	ie:'рука',
10983 	re:'руки',
10984 	de:'руке',
10985 	ve:'руку',
10986 	te:'рукой',
10987 	pe:'руке',
10988 	im:'руки',
10989 	rm:'рук',
10990 	dm:'рукам',
10991 	vm:'руки',
10992 	tm:'руками',
10993 	pm:'руках',
10994 	rod:1,
10995 	skl:1,
10996 	odu:0,
10997 };
10998 lx['ручка']={
10999 	ie:'ручка',
11000 	re:'ручки',
11001 	de:'ручке',
11002 	ve:'ручку',
11003 	te:'ручкой',
11004 	pe:'ручке',
11005 	im:'ручки',
11006 	rm:'ручек',
11007 	dm:'ручкам',
11008 	vm:'ручки',
11009 	tm:'ручками',
11010 	pm:'ручках',
11011 	rod:1,
11012 	skl:1,
11013 	odu:0,
11014 };
11015 lx['Санкт-Петербург']={
11016 	ie:'Санкт-Петербург',
11017 	re:'Санкт-Петербурга',
11018 	de:'Санкт-Петербургу',
11019 	ve:'Санкт-Петербург',
11020 	te:'Санкт-Петербургом',
11021 	pe:'Санкт-Петербурге',
11022 	im:'Санкт-Петербурги',
11023 	rm:'Санкт-Петербургов',
11024 	dm:'Санкт-Петербургам',
11025 	vm:'Санкт-Петербурги',
11026 	tm:'Санкт-Петербургами',
11027 	pm:'Санкт-Петербургах',
11028 	rod:0,
11029 	skl:2,
11030 	odu:0,
11031 };
11032 lx['сантиметр']={
11033 	ie:'сантиметр',
11034 	re:'сантиметра',
11035 	de:'сантиметру',
11036 	ve:'сантиметр',
11037 	te:'сантиметром',
11038 	pe:'сантиметре',
11039 	im:'сантиметры',
11040 	rm:'сантиметров',
11041 	dm:'сантиметрам',
11042 	vm:'сантиметры',
11043 	tm:'сантиметрами',
11044 	pm:'сантиметрах',
11045 	rod:0,
11046 	skl:2,
11047 	odu:0,
11048 	skr:'см',
11049 };
11050 lx['секретариат']={
11051 	ie:'секретариат',
11052 	re:'секретариата',
11053 	de:'секретариату',
11054 	ve:'секретариат',
11055 	te:'секретариатом',
11056 	pe:'секретариате',
11057 	im:'секретариаты',
11058 	rm:'секретариатов',
11059 	dm:'секретариатам',
11060 	vm:'секретариаты',
11061 	tm:'секретариатами',
11062 	pm:'секретариатах',
11063 	rod:0,
11064 	skl:2,
11065 	odu:0,
11066 };
11067 lx['село']={
11068 	ie:'село',
11069 	re:'села',
11070 	de:'селу',
11071 	ve:'село',
11072 	te:'селом',
11073 	pe:'селе',
11074 	im:'сёла',
11075 	rm:'сёл',
11076 	dm:'сёлам',
11077 	vm:'сёла',
11078 	tm:'сёлами',
11079 	pm:'сёлах',
11080 	rod:2,
11081 	skl:2,
11082 	odu:0,
11083 };
11084 lx['Семилуки']={
11085         ie:'Семилуки',
11086         re:'Семилук',
11087         de:'Семилукам',
11088         ve:'Семилуки',
11089         te:'Семилуками',
11090         pe:'Семилуках',
11091         im:'Семилуки',
11092         rm:'Семилук',
11093         dm:'Семилукам',
11094         vm:'Семилуки',
11095         tm:'Семилуками',
11096         pm:'Семилуках',
11097         rod:3,
11098         skl:2,
11099         odu:0,
11100 };
11101 lx['сентябрь']={
11102 	ie:'сентябрь',
11103 	re:'сентября',
11104 	de:'сентябрю',
11105 	ve:'сентябрь',
11106 	te:'сентябре',
11107 	pe:'сентябре',
11108 	im:'сентябри',
11109 	rm:'сентябрей',
11110 	dm:'сентябрям',
11111 	vm:'сентябри',
11112 	tm:'сентябрями',
11113 	pm:'сентябрях',
11114 	rod:0,
11115 	skl:2,
11116 	odu:0,
11117 };
11118 lx['Сербия']={
11119 	ie:'Сербия',
11120 	re:'Сербии',
11121 	de:'Сербии',
11122 	ve:'Сербию',
11123 	te:'Сербией',
11124 	pe:'Сербии',
11125 	im:'Сербии',
11126 	rm:'Сербий',
11127 	dm:'Сербиям',
11128 	vm:'Сербии',
11129 	tm:'Сербиями',
11130 	pm:'Сербиях',
11131 	rod:1,
11132 	skl:1,
11133 	odu:0,
11134 };
11135 lx['Сергеевна']={
11136 	ie:'Сергеевна',
11137 	re:'Сергеевны',
11138 	de:'Сергеевне',
11139 	ve:'Сергеевну',
11140 	te:'Сергеевной',
11141 	pe:'Сергеевне',
11142 	im:'Сергеевны',
11143 	rm:'Сергеевн',
11144 	dm:'Сергеевнам',
11145 	vm:'Сергеевн',
11146 	tm:'Сергеевнами',
11147 	pm:'Сергеевнах',
11148 	rod:1,
11149 	skl:1,
11150 	odu:0,
11151 };
11152 lx['склонение']={
11153 	ie:'склонение',
11154 	re:'склонения',
11155 	de:'склонению',
11156 	ve:'склонение',
11157 	te:'склонением',
11158 	pe:'склонении',
11159 	im:'склонения',
11160 	rm:'склонений',
11161 	dm:'склонениям',
11162 	vm:'склонения',
11163 	tm:'склонениями',
11164 	pm:'склонениях',
11165 	rod:2,
11166 	skl:2,
11167 	odu:0,
11168 	sbs:0,
11169 	chr:1,
11170 };
11171 lx['Словакия']={
11172 	ie:'Словакия',
11173 	re:'Словакии',
11174 	de:'Словакии',
11175 	ve:'Словакию',
11176 	te:'Словакией',
11177 	pe:'Словакии',
11178 	im:'Словакии',
11179 	rm:'Словакий',
11180 	dm:'Словакиям',
11181 	vm:'Словакии',
11182 	tm:'Словакиями',
11183 	pm:'Словакиях',
11184 	rod:1,
11185 	skl:1,
11186 	odu:0,
11187 };
11188 lx['словарь']={
11189 	ie:'словарь',
11190 	re:'словаря',
11191 	de:'словарю',
11192 	ve:'словарь',
11193 	te:'словарем',
11194 	pe:'словаре',
11195 	im:'словари',
11196 	rm:'словарей',
11197 	dm:'словарям',
11198 	vm:'словари',
11199 	tm:'словарями',
11200 	pm:'словарях',
11201 	rod:0,
11202 	skl:2,
11203 	odu:0,
11204 	chr:1,
11205 };
11206 lx['Словения']={
11207 	ie:'Словения',
11208 	re:'Словении',
11209 	de:'Словении',
11210 	ve:'Словению',
11211 	te:'Словенией',
11212 	pe:'Словении',
11213 	im:'Словении',
11214 	rm:'Словений',
11215 	dm:'Словениям',
11216 	vm:'Словении',
11217 	tm:'Словениями',
11218 	pm:'Словениях',
11219 	rod:1,
11220 	skl:1,
11221 	odu:0,
11222 };
11223 lx['слово']={
11224 	ie:'слово',
11225 	re:'слова',
11226 	de:'слову',
11227 	ve:'слове',
11228 	te:'словом',
11229 	pe:'слове',
11230 	im:'слова',
11231 	rm:'слов',
11232 	dm:'словам',
11233 	vm:'слова',
11234 	tm:'словами',
11235 	pm:'словах',
11236 	rod:2,
11237 	skl:2,
11238 	odu:0,
11239 	chr:1,
11240 };
11241 lx['солярка']={
11242 	ie:'солярка',
11243 	re:'солярки',
11244 	de:'солярке',
11245 	ve:'солярку',
11246 	te:'соляркой',
11247 	pe:'солярке',
11248 	im:'солярки',
11249 	rm:'солярк',
11250 	dm:'соляркам',
11251 	vm:'солярки',
11252 	tm:'солярками',
11253 	pm:'солярках',
11254 	rod:1,
11255 	skl:1,
11256 	odu:0,
11257 };
11258 lx['Сочи']={
11259 	ie:'Сочи',
11260 	re:'Сочи',
11261 	de:'Сочи',
11262 	ve:'Сочи',
11263 	te:'Сочи',
11264 	pe:'Сочи',
11265 	im:'Сочи',
11266 	rm:'Сочи',
11267 	dm:'Сочи',
11268 	vm:'Сочи',
11269 	tm:'Сочи',
11270 	pm:'Сочи',
11271 	rod:1,
11272 	skl:0,
11273 	odu:0,
11274 };
11275 lx['среда']={
11276 	ie:'среда',
11277 	re:'среды',
11278 	de:'среде',
11279 	ve:'среду',
11280 	te:'средой',
11281 	pe:'среде',
11282 	im:'среды',
11283 	rm:'сред',
11284 	dm:'средам',
11285 	vm:'среды',
11286 	tm:'средами',
11287 	pm:'средах',
11288 	rod:1,
11289 	skl:1,
11290 	odu:0,
11291 };
11292 lx['сторона']={
11293 	ie:'сторона',
11294 	re:'стороны',
11295 	de:'стороне',
11296 	ve:'сторону',
11297 	te:'стороной',
11298 	pe:'стороне',
11299 	im:'стороны',
11300 	rm:'сторон',
11301 	dm:'сторонам',
11302 	vm:'стороны',
11303 	tm:'сторонами',
11304 	pm:'сторонах',
11305 	rod:1,
11306 	skl:1,
11307 	odu:0,
11308 };
11309 lx['студентка']={
11310 	ie:'студентка',
11311 	re:'студентки',
11312 	de:'студентке',
11313 	ve:'студентку',
11314 	te:'студенткой',
11315 	pe:'студентке',
11316 	im:'студентки',
11317 	rm:'студенток',
11318 	dm:'студенткам',
11319 	vm:'студенток',
11320 	tm:'студентками',
11321 	pm:'студентках',
11322 	rod:1,
11323 	skl:1,
11324 	odu:0,
11325 };
11326 lx['суббота']={
11327 	ie:'суббота',
11328 	re:'субботы',
11329 	de:'субботе',
11330 	ve:'субботу',
11331 	te:'субботой',
11332 	pe:'субботе',
11333 	im:'субботы',
11334 	rm:'суббот',
11335 	dm:'субботам',
11336 	vm:'субботы',
11337 	tm:'субботами',
11338 	pm:'субботах',
11339 	rod:1,
11340 	skl:1,
11341 	odu:0,
11342 };
11343 lx['сувенир']={
11344 	ie:'сувенир',
11345 	re:'сувенира',
11346 	de:'сувениру',
11347 	ve:'сувенир',
11348 	te:'сувениром',
11349 	pe:'сувенире',
11350 	im:'сувениры',
11351 	rm:'сувениров',
11352 	dm:'сувенирам',
11353 	vm:'сувениры',
11354 	tm:'сувенирами',
11355 	pm:'сувенирах',
11356 	rod:0,
11357 	skl:2,
11358 	odu:0,
11359 };
11360 lx['сырок']={
11361 	ie:'сырок',
11362 	re:'сырка',
11363 	de:'сырку',
11364 	ve:'сырок',
11365 	te:'сырком',
11366 	pe:'сырке',
11367 	im:'сырки',
11368 	rm:'сырков',
11369 	dm:'сыркам',
11370 	vm:'сырки',
11371 	tm:'сырками',
11372 	pm:'сырках',
11373 	rod:0,
11374 	skl:2,
11375 	odu:0,
11376 };
11377 lx['теплоход']={
11378 	ie:'теплоход',
11379 	re:'теплохода',
11380 	de:'теплоходу',
11381 	ve:'теплоход',
11382 	te:'теплоходом',
11383 	pe:'теплоходе',
11384 	im:'теплоходы',
11385 	rm:'теплоходов',
11386 	dm:'теплоходам',
11387 	vm:'теплоходы',
11388 	tm:'теплоходами',
11389 	pm:'теплоходах',
11390 	rod:0,
11391 	skl:2,
11392 	odu:0,
11393 };
11394 lx['террариум']={
11395 	ie:'террариум',
11396 	re:'террариума',
11397 	de:'террариуму',
11398 	ve:'террариум',
11399 	te:'террариумом',
11400 	pe:'террариуме',
11401 	im:'террариумы',
11402 	rm:'террариумов',
11403 	dm:'террариумам',
11404 	vm:'террариумы',
11405 	tm:'террариумами',
11406 	pm:'террариумах',
11407 	rod:0,
11408 	skl:2,
11409 	odu:0,
11410 };
11411 lx['тетрадь']={
11412 	ie:'тетрадь',
11413 	re:'тетради',
11414 	de:'тетради',
11415 	ve:'тетрадь',
11416 	te:'тетрадью',
11417 	pe:'тетради',
11418 	im:'тетради',
11419 	rm:'тетрадей',
11420 	dm:'тетрадям',
11421 	vm:'тетради',
11422 	tm:'тетрадями',
11423 	pm:'тетрадях',
11424 	rod:1,
11425 	skl:3,
11426 	odu:0,
11427 };
11428 lx['тонна']={
11429 	ie:'тонна',
11430 	re:'тонны',
11431 	de:'тонне',
11432 	ve:'тонну',
11433 	te:'тонной',
11434 	pe:'тонне',
11435 	im:'тонны',
11436 	rm:'тонн',
11437 	dm:'тоннам',
11438 	vm:'тонны',
11439 	tm:'тоннами',
11440 	pm:'тоннах',
11441 	rod:1,
11442 	skl:1,
11443 	odu:0,
11444 }; 
11445 lx['топливо']={
11446 	ie:'топливо',
11447 	re:'топлива',
11448 	de:'топливу',
11449 	ve:'топливо',
11450 	te:'топливом',
11451 	pe:'топливе',
11452 	im:'топливо',
11453 	rm:'топлива',
11454 	dm:'топливу',
11455 	vm:'топливо',
11456 	tm:'топливом',
11457 	pm:'топливе',
11458 	rod:2,
11459 	skl:2,
11460 	odu:0,
11461 }; 
11462 lx['точка']={
11463 	ie:'точка',
11464 	re:'точки',
11465 	de:'точке',
11466 	ve:'точку',
11467 	te:'точкой',
11468 	pe:'точке',
11469 	im:'точки',
11470 	rm:'точек',
11471 	dm:'точкам',
11472 	vm:'точки',
11473 	tm:'точками',
11474 	pm:'точках',
11475 	rod:1,
11476 	skl:1,
11477 	odu:0,
11478 };
11479 lx['трапеция']={
11480 	ie:'трапеция',
11481 	re:'трапеции',
11482 	de:'трапеции',
11483 	ve:'трапецию',
11484 	te:'трапецией',
11485 	pe:'трапеции',
11486 	im:'трапеции',
11487 	rm:'трапеций',
11488 	dm:'трапециям',
11489 	vm:'трапеции',
11490 	tm:'трапециями',
11491 	pm:'трапециях',
11492 	rod:1,
11493 	skl:1,
11494 	odu:0,
11495 };
11496 lx['учебник']={
11497 	ie:'учебник',
11498 	re:'учебника',
11499 	de:'учебнику',
11500 	ve:'учебник',
11501 	te:'учебником',
11502 	pe:'учебнике',
11503 	im:'учебники',
11504 	rm:'учебников',
11505 	dm:'учебникам',
11506 	vm:'учебники',
11507 	tm:'учебниками',
11508 	pm:'учебниках',
11509 	rod:0,
11510 	skl:2,
11511 	odu:0,
11512 };
11513 lx['февраль']={
11514 	ie:'февраль',
11515 	re:'февраля',
11516 	de:'февралю',
11517 	ve:'февраль',
11518 	te:'февралём',
11519 	pe:'феврале',
11520 	im:'феврали',
11521 	rm:'февралей',
11522 	dm:'февралям',
11523 	vm:'феврали',
11524 	tm:'февралями',
11525 	pm:'февралях',
11526 	rod:0,
11527 	skl:2,
11528 	odu:0,
11529 };
11530 lx['Фёдоровна']={
11531 	ie:'Фёдоровна',
11532 	re:'Фёдоровны',
11533 	de:'Фёдоровне',
11534 	ve:'Фёдоровну',
11535 	te:'Фёдоровной',
11536 	pe:'Фёдоровне',
11537 	im:'Фёдоровны',
11538 	rm:'Фёдоровн',
11539 	dm:'Фёдоровнам',
11540 	vm:'Фёдоровн',
11541 	tm:'Фёдоровнами',
11542 	pm:'Фёдоровнах',
11543 	rod:1,
11544 	skl:1,
11545 	odu:0,
11546 };
11547 lx['флэшка']={
11548 	ie:'флэшка',
11549 	re:'флэшки',
11550 	de:'флэшке',
11551 	ve:'флэшку',
11552 	te:'флэшкой',
11553 	pe:'флэшке',
11554 	im:'флэшки',
11555 	rm:'флэшек',
11556 	dm:'флэшкам',
11557 	vm:'флэшки',
11558 	tm:'флэшками',
11559 	pm:'флэшках',
11560 	rod:1,
11561 	skl:1,
11562 	odu:0,
11563 };
11564 lx['фонарик']={
11565 	ie:'фонарик',
11566 	re:'фонарика',
11567 	de:'фонарику',
11568 	ve:'фонарик',
11569 	te:'фонариком',
11570 	pe:'фонарике',
11571 	im:'фонарики',
11572 	rm:'фонариков',
11573 	dm:'фонарикам',
11574 	vm:'фонарики',
11575 	tm:'фонариками',
11576 	pm:'фонариках',
11577 	rod:0,
11578 	skl:2,
11579 	odu:0,
11580 };
11581 lx['форма']={
11582 	ie:'форма',
11583 	re:'формы',
11584 	de:'форме',
11585 	ve:'форму',
11586 	te:'формой',
11587 	pe:'форме',
11588 	im:'формы',
11589 	rm:'форм',
11590 	dm:'формам',
11591 	vm:'формы',
11592 	tm:'формами',
11593 	pm:'формах',
11594 	rod:1,
11595 	skl:1,
11596 	odu:0,
11597 	chr:1,
11598 };
11599 lx['фурлонг']={
11600 	ie:'фурлонг',
11601 	re:'фурлонга',
11602 	de:'фурлонгу',
11603 	ve:'фурлонг',
11604 	te:'фурлонгом',
11605 	pe:'фурлонге',
11606 	im:'фурлонги',
11607 	rm:'фурлонгов',
11608 	dm:'фурлонгам',
11609 	vm:'фурлонги',
11610 	tm:'фурлонгами',
11611 	pm:'фурлонгах',
11612 	rod:0,
11613 	skl:2,
11614 	odu:0,
11615 };
11616 lx['Хабаровск']={
11617 	ie:'Хабаровск',
11618 	re:'Хабаровска',
11619 	de:'Хабаровску',
11620 	ve:'Хабаровск',
11621 	te:'Хабаровском',
11622 	pe:'Хабаровске',
11623 	im:'Хабаровски',
11624 	rm:'Хабаровсков',
11625 	dm:'Хабаровскам',
11626 	vm:'Хабаровски',
11627 	tm:'Хабаровсками',
11628 	pm:'Хабаровсках',
11629 	rod:0,
11630 	skl:2,
11631 	odu:0,
11632 	sbs:1,
11633 	chr:1,
11634 };
11635 lx['хутор']={
11636 	ie:'хутор',
11637 	re:'хутора',
11638 	de:'хутору',
11639 	ve:'хутор',
11640 	te:'хутором',
11641 	pe:'хуторе',
11642 	im:'хутора',
11643 	rm:'хуторов',
11644 	dm:'хуторам',
11645 	vm:'хутора',
11646 	tm:'хуторами',
11647 	pm:'хуторах',
11648 	rod:0,
11649 	skl:2,
11650 	odu:0,
11651 };
11652 lx['час']={
11653 	ie:'час',
11654 	re:'часа',
11655 	de:'часу',
11656 	ve:'час',
11657 	te:'часом',
11658 	pe:'часе',
11659 	im:'часы',
11660 	rm:'часов',
11661 	dm:'часам',
11662 	vm:'часы',
11663 	tm:'часами',
11664 	pm:'часах',
11665 	rod:0,
11666 	skl:2,
11667 	odu:0,
11668 };
11669 lx['четверг']={
11670 	ie:'четверг',
11671 	re:'четверга',
11672 	de:'четвергу',
11673 	ve:'четверг',
11674 	te:'четвергом',
11675 	pe:'четверге',
11676 	im:'четверги',
11677 	rm:'четвергов',
11678 	dm:'четвергам',
11679 	vm:'четверги',
11680 	tm:'четвергами',
11681 	pm:'четвергах',
11682 	rod:0,
11683 	skl:2,
11684 	odu:0,
11685 };
11686 lx['четырёхугольник']={
11687 	ie:'четырёхугольник',
11688 	re:'четырёхугольника',
11689 	de:'четырёхугольнику',
11690 	ve:'четырёхугольник',
11691 	te:'четырёхугольником',
11692 	pe:'четырёхугольнике',
11693 	im:'четырёхугольники',
11694 	rm:'четырёхугольников',
11695 	dm:'четырёхугольникам',
11696 	vm:'четырёхугольники',
11697 	tm:'четырёхугольниками',
11698 	pm:'четырёхугольниках',
11699 	rod:0,
11700 	skl:2,
11701 	odu:0,
11702 };
11703 lx['Чехия']={
11704 	ie:'Чехия',
11705 	re:'Чехии',
11706 	de:'Чехии',
11707 	ve:'Чехию',
11708 	te:'Чехией',
11709 	pe:'Чехии',
11710 	im:'Чехии',
11711 	rm:'Чехий',
11712 	dm:'Чехиям',
11713 	vm:'Чехии',
11714 	tm:'Чехиями',
11715 	pm:'Чехиях',
11716 	rod:1,
11717 	skl:1,
11718 	odu:0,
11719 };
11720 lx['число']={
11721 	ie:'число',
11722 	re:'числа',
11723 	de:'числу',
11724 	ve:'число',
11725 	te:'числом',
11726 	pe:'числе',
11727 	im:'числа',
11728 	rm:'чисел',
11729 	dm:'числам',
11730 	vm:'числа',
11731 	tm:'числами',
11732 	pm:'числах',
11733 	rod:2,
11734 	skl:2,
11735 	odu:0,
11736 	chr:1,
11737 };
11738 lx['шахматы']={
11739 	ie:'шахматы',
11740 	re:'шахмат',
11741 	de:'шахматам',
11742 	ve:'шахматы',
11743 	te:'шахматами',
11744 	pe:'шахматах',
11745 	im:'шахматы',
11746 	rm:'шахмат',
11747 	dm:'шахматам',
11748 	vm:'шахматы',
11749 	tm:'шахматами',
11750 	pm:'шахматах',
11751 	rod:0,
11752 	skl:2,
11753 	odu:0,
11754 };
11755 lx['шашки']={
11756 	ie:'шашки',
11757 	re:'шашек',
11758 	de:'шашкам',
11759 	ve:'шашки',
11760 	te:'шашками',
11761 	pe:'шашках',
11762 	im:'шашки',
11763 	rm:'шашек',
11764 	dm:'шашкам',
11765 	vm:'шашки',
11766 	tm:'шашками',
11767 	pm:'шашках',
11768 	rod:3,
11769 	skl:1,
11770 	odu:0,
11771 };
11772 lx['школьница']={
11773 	ie:'школьница',
11774 	re:'школьницы',
11775 	de:'школьнице',
11776 	ve:'школьницу',
11777 	te:'школьницей',
11778 	pe:'школьнице',
11779 	im:'школьницы',
11780 	rm:'школьниц',
11781 	dm:'школьницам',
11782 	vm:'школьницы',
11783 	tm:'школьницами',
11784 	pm:'школьницах',
11785 	rod:1,
11786 	skl:1,
11787 	odu:0,
11788 };
11789 lx['шлак']={
11790 	ie:'шлак',
11791 	re:'шлака',
11792 	de:'шлаку',
11793 	ve:'шлак',
11794 	te:'шлаком',
11795 	pe:'шлаке',
11796 	im:'шлаки',
11797 	rm:'шлаков',
11798 	dm:'шлакам',
11799 	vm:'шлаки',
11800 	tm:'шлаками',
11801 	pm:'шлаках',
11802 	rod:0,
11803 	skl:2,
11804 	odu:0,
11805 };
11806 lx['шоколадка']={
11807 	ie:'шоколадка',
11808 	re:'шоколадки',
11809 	de:'шоколадке',
11810 	ve:'шоколадку',
11811 	te:'шоколадкой',
11812 	pe:'шоколадке',
11813 	im:'шоколадки',
11814 	rm:'шоколадок',
11815 	dm:'шоколадкам',
11816 	vm:'шоколадки',
11817 	tm:'шоколадками',
11818 	pm:'шоколадках',
11819 	rod:1,
11820 	skl:1,
11821 	odu:0,
11822 };
11823 lx['щебень']={
11824 	ie:'щебень',
11825 	re:'щебня',
11826 	de:'щебню',
11827 	ve:'щебень',
11828 	te:'щебнем',
11829 	pe:'щебне',
11830 	im:'щебни',
11831 	rm:'щебней',
11832 	dm:'щебням',
11833 	vm:'щебни',
11834 	tm:'щебнями',
11835 	pm:'щебнях',
11836 	rod:0,
11837 	skl:2,
11838 	odu:0,
11839 };
11840 lx['Эквадор']={
11841 	ie:'Эквадор',
11842 	re:'Эквадора',
11843 	de:'Эквадору',
11844 	ve:'Эквадор',
11845 	te:'Эквадором',
11846 	pe:'Эквадоре',
11847 	im:'Эквадоры',
11848 	rm:'Эквадоров',
11849 	dm:'Эквадорам',
11850 	vm:'Эквадоры',
11851 	tm:'Эквадорами',
11852 	pm:'Эквадорах',
11853 	rod:0,
11854 	skl:2,
11855 	odu:0,
11856 };
11857 lx['электричка']={
11858 	ie:'электричка',
11859 	re:'электрички',
11860 	de:'электричке',
11861 	ve:'электричку',
11862 	te:'электричкой',
11863 	pe:'электричке',
11864 	im:'электрички',
11865 	rm:'электричк',
11866 	dm:'электричкам',
11867 	vm:'электрички',
11868 	tm:'электричками',
11869 	pm:'электричках',
11870 	rod:1,
11871 	skl:1,
11872 	odu:0,
11873 }; 
11874 lx['Элеонора']={
11875 	ie:'Элеонора',
11876 	re:'Элеоноры',
11877 	de:'Элеоноре',
11878 	ve:'Элеонору',
11879 	te:'Элеонорой',
11880 	pe:'Элеоноре',
11881 	im:'Элеоноры',
11882 	rm:'Элеонор',
11883 	dm:'Элеонорам',
11884 	vm:'Элеонор',
11885 	tm:'Элеонорами',
11886 	pm:'Элеонорах',
11887 	rod:1,
11888 	skl:1,
11889 	odu:0,
11890 };
11891 lx['этаж']={
11892 	ie:'этаж',
11893 	re:'этажа',
11894 	de:'этажу',
11895 	ve:'этаж',
11896 	te:'этажом',
11897 	pe:'этаже',
11898 	im:'этажи',
11899 	rm:'этажей',
11900 	dm:'этажам',
11901 	vm:'этажи',
11902 	tm:'этажами',
11903 	pm:'этажах',
11904 	rod:0,
11905 	skl:2,
11906 	odu:0,
11907 };
11908 lx['Юлия']={
11909 	ie:'Юлия',
11910 	re:'Юлии',
11911 	de:'Юлии',
11912 	ve:'Юлию',
11913 	te:'Юлией',
11914 	pe:'Юлии',
11915 	im:'Юлии',
11916 	rm:'Юлий',
11917 	dm:'Юлиям',
11918 	vm:'Юлий',
11919 	tm:'Юлиями',
11920 	pm:'Юлиях',
11921 	rod:1,
11922 	skl:1,
11923 	odu:0,
11924 };
11925 lx['яблоко']={
11926 	ie:'яблоко',
11927 	re:'яблока',
11928 	de:'яблоку',
11929 	ve:'яблоко',
11930 	te:'яблоком',
11931 	pe:'яблоке',
11932 	im:'яблоки',
11933 	rm:'яблок',
11934 	dm:'яблокам',
11935 	vm:'яблоки',
11936 	tm:'яблоками',
11937 	pm:'яблоках',
11938 	rod:2,
11939 	skl:2,
11940 	odu:0,
11941 };
11942 lx['Яна']={
11943 	ie:'Яна',
11944 	re:'Яны',
11945 	de:'Яне',
11946 	ve:'Яну',
11947 	te:'Яной',
11948 	pe:'Яне',
11949 	im:'Яны',
11950 	rm:'Ян',
11951 	dm:'Янам',
11952 	vm:'Ян',
11953 	tm:'Янами',
11954 	pm:'Янах',
11955 	rod:1,
11956 	skl:1,
11957 	odu:0,
11958 };
11959 lx['январь']={
11960 	ie:'январь',
11961 	re:'января',
11962 	de:'январю',
11963 	ve:'январь',
11964 	te:'январём',
11965 	pe:'январе',
11966 	im:'январи',
11967 	rm:'январей',
11968 	dm:'январям',
11969 	vm:'январи',
11970 	tm:'январями',
11971 	pm:'январях',
11972 	rod:0,
11973 	skl:2,
11974 	odu:0,
11975 };
11976 
11977 //}}Существительные
11978 
11979 ////////////////////////////////////////////////////////////////////////
11980 
11981 lx['выраженный']={};
11982 lx['выраженный'].i=['выраженный','выраженная','выраженное','выраженные'];
11983 lx['выраженный'].r=['выраженного','выраженной','выраженного','выраженных'];
11984 lx['выраженный'].d=['выраженному','выраженной','выраженному','выраженным'];
11985 lx['выраженный'].v=['выраженный','выраженную','выраженное','выраженные'];
11986 lx['выраженный'].t=['выраженным','выраженной','выраженным','выраженными'];
11987 lx['выраженный'].p=['выраженном','выраженной','выраженном','выраженных'];
11988 
11989 ///////////////////////////////////////////////////////////////////////
11990 //Здесь - только список наречий
11991 //sl - само слово. Оно же неизменяемое
11992 //sr - сравнительная степень
11993 //pr - превосходная степень
11994 //chr - часть речи.
11995 //0 - наречие
11996 //1 - существительное
11997 //2 - числительное
11998 //3 - прилагательное
11999 //4 - местоимение
12000 
12001 lx['абсолютно']={
12002 	sl:'абсолютно',
12003 	chr:0,
12004 }
12005 lx['временно']={
12006 	sl:'временно',
12007 	chr:0,
12008 }
12009 ////////////////////////////////////////////////////////////////////////
12010 //
12011 //	ie: именительный	падеж единственного	числа
12012 //	re: родительный		падеж единственного	числа
12013 //	de: дательный		падеж единственного	числа
12014 //	ve: винительный		падеж единственного	числа
12015 //	te: творительный	падеж единственного	числа
12016 //	pe: предложный		падеж единственного	числа
12017 //	ie: именительный	падеж множественного	числа
12018 //	re: родительный		падеж множественного	числа
12019 //	de: дательный		падеж множественного	числа
12020 //	ve: винительный		падеж множественного	числа
12021 //	te: творительный	падеж множественного	числа
12022 //	pe: предложный		падеж множественного	числа
12023 //
12024 //	rod: род:
12025 //		0: мужской
12026 //		1: женский
12027 //		2: средний
12028 //		3: только множественное число
12029 //
12030 //	odu: одушевлённость:
12031 //		0: неодушевлённое
12032 //		1: одушевлённое
12033 //
12034 //	skl: склонение:
12035 //		0: несклоняемое
12036 //		1: первое
12037 //		2: второе
12038 //		3: третье
12039 //		4: разносклоняемые существительные
12040 ////////////////////////////////////////////////////////////////////////
12041 if(lx==undefined)
12042 	var lx=[];	//Объявляем глобальный объект lx
12043 ////////////////////////////////////////////////////////////////////////
12044 
12045 //{{Словосочетания с главным словом - существительным
12046 lx['американская миля']={
12047 	ie:'американская миля',
12048 	re:'американской мили',
12049 	de:'американской миле',
12050 	ve:'американскую милю',
12051 	te:'американской милей',
12052 	pe:'американской миле',
12053 	im:'американские мили',
12054 	rm:'американских миль',
12055 	dm:'американским милям',
12056 	vm:'американские мили',
12057 	tm:'американскими милями',
12058 	pm:'американских милях',
12059 	rod:1,
12060 	odu:0,
12061 };
12062 lx['бутылка газировки']={
12063 	ie:'бутылка газировки',
12064 	re:'бутылки газировки',
12065 	de:'бутылке газировки',
12066 	ve:'бутылку газировки',
12067 	te:'бутылкой газировки',
12068 	pe:'бутылке газировки',
12069 	im:'бутылки газировки',
12070 	rm:'бутылок газировки',
12071 	dm:'бутылкам газировки',
12072 	vm:'бутылки газировки',
12073 	tm:'бутылками газировки',
12074 	pm:'бутылках газировки',
12075 	rod:0,
12076 	odu:0,
12077 };
12078 lx['буханка хлеба']={
12079 	ie:'буханка хлеба',
12080 	re:'буханки хлеба',
12081 	de:'буханке хлеба',
12082 	ve:'буханку хлеба',
12083 	te:'буханкой хлеба',
12084 	pe:'буханке хлеба',
12085 	im:'буханки хлеба',
12086 	rm:'буханок хлеба',
12087 	dm:'буханкам хлеба',
12088 	vm:'буханки хлеба',
12089 	tm:'буханками хлеба',
12090 	pm:'буханках хлеба',
12091 	rod:1,
12092 	odu:0,
12093 };
12094 lx['вольная борьба']={
12095 	ie:'вольная борьба',
12096 	re:'вольной борьбы',
12097 	de:'вольной борьбе',
12098 	ve:'вольную борьбу',
12099 	te:'вольной борьбой',
12100 	pe:'вольной борьбе',
12101 	im:'вольные борьбы',
12102 	rm:'вольных борьб',
12103 	dm:'вольным борьбам',
12104 	vm:'вольные борьбы',
12105 	tm:'вольными борьбами',
12106 	pm:'вольных борьбах',
12107 	rod:1,
12108 	odu:0,
12109 };
12110 lx['доисторический омнибус']={
12111 	ie:'доисторический омнибус',
12112 	re:'доисторического омнибуса',
12113 	de:'доисторическому омнибусу',
12114 	ve:'доисторический омнибус',
12115 	te:'доисторическим омнибусом',
12116 	pe:'доисторическом омнибусе',
12117 	im:'доисторические омнибусы',
12118 	rm:'доисторических омнибусов',
12119 	dm:'доисторическим омнибусам',
12120 	vm:'доисторические омнибусы',
12121 	tm:'доисторическими омнибусами',
12122 	pm:'доисторических омнибусах',
12123 	rod:0,
12124 	odu:0,
12125 };
12126 lx['книжная полка']={
12127 	ie:'книжная полка',
12128 	re:'книжной полки',
12129 	de:'книжной полке',
12130 	ve:'книжную полку',
12131 	te:'книжной полкой',
12132 	pe:'книжной полке',
12133 	im:'книжные полки',
12134 	rm:'книжных полок',
12135 	dm:'книжным полкам',
12136 	vm:'книжные полки',
12137 	tm:'книжными полками',
12138 	pm:'книжных полках',
12139 	rod:1,
12140 	odu:0,
12141 };
12142 lx['комсомолка, спортсменка, отличница и, наконец, просто красавица']={
12143 	ie:'комсомолка, спортсменка, отличница и, наконец, просто красавица',
12144 	re:'комсомолки, спортсменки, отличницы и, наконец, просто красавицы',
12145 	de:'комсомолке, спортсменке, отличнице и, наконец, просто красавице',
12146 	ve:'комсомолку, спортсменку, отличницу и, наконец, просто красавицу',
12147 	te:'комсомолкой, спортсменкой, отличницей и, наконец, просто красавицей',
12148 	pe:'комсомолке, спортсменке, отличнице и, наконец, просто красавице',
12149 	im:'комсомолки, спортсменки, отличницы и, наконец, просто красавицы',
12150 	rm:'комсомолок, спортсменок, отличниц и, наконец, просто красавиц',
12151 	dm:'комсомолкам, спортсменкам, отличницам и, наконец, просто красавицам',
12152 	vm:'комсомолок, спортсменок, отличниц и, наконец, просто красавиц',
12153 	tm:'комсомолками, спортсменками, отличницами и, наконец, просто красавицами',
12154 	pm:'комсомолках, спортсменках, отличницах и, наконец, просто красавицах',
12155 	rod:1,
12156 	odu:0,
12157 };
12158 lx['круизный лайнер']={
12159 	ie:'круизный лайнер',
12160 	re:'круизного лайнера',
12161 	de:'круизному лайнеру',
12162 	ve:'круизный лайнер',
12163 	te:'круизным лайнером',
12164 	pe:'круизном лайнере',
12165 	im:'круизные лайнеры',
12166 	rm:'круизных лайнеров',
12167 	dm:'круизным лайнерам',
12168 	vm:'круизные лайнеры',
12169 	tm:'круизными лайнерами',
12170 	pm:'круизных лайнерах',
12171 	rod:0,
12172 	odu:0,
12173 };
12174 lx['лёгкая атлетика']={
12175 	ie:'лёгкая атлетика',
12176 	re:'лёкой атлетики',
12177 	de:'лёгкой атлетике',
12178 	ve:'лёгкую атлетику',
12179 	te:'лёгкой атлетикой',
12180 	pe:'лёгкой атлетике',
12181 	im:'лёгкие атлетики',
12182 	rm:'лёгких атлетик',
12183 	dm:'лёгким атлетикам',
12184 	vm:'лёгкие атлетики',
12185 	tm:'лёгкими атлетиками',
12186 	pm:'лёгких атлетиках',
12187 	rod:1,
12188 	odu:0,
12189 };
12190 lx['магнит на холодильник']={
12191 	ie:'магнит на холодильник',
12192 	re:'магнита на холодильник',
12193 	de:'магниту на холодильник',
12194 	ve:'магнит на холодильник',
12195 	te:'магнитом на холодильник',
12196 	pe:'магните на холодильник',
12197 	im:'магниты на холодильник',
12198 	rm:'магнитов на холодильник',
12199 	dm:'магнитам на холодильник',
12200 	vm:'магниты на холодильник',
12201 	tm:'магнитами на холодильник',
12202 	pm:'магнитах на холодильник',
12203 	rod:0,
12204 	odu:0,
12205 };
12206 lx['метиловый спирт']={
12207 	ie:'метиловый спирт',
12208 	re:'метилового спирта',
12209 	de:'метиловому спирту',
12210 	ve:'метиловый спирт',
12211 	te:'метиловым спиртом',
12212 	pe:'метиловом спирте',
12213 	im:'метиловые спирты',
12214 	rm:'метиловых спиртов',
12215 	dm:'метиловым спиртам',
12216 	vm:'метиловые спирты',
12217 	tm:'метиловыми спиртами',
12218 	pm:'метиловых спиртах',
12219 	rod:0,
12220 	odu:0,
12221 };
12222 lx['морская миля']={
12223 	ie:'морская миля',
12224 	re:'морской мили',
12225 	de:'морской миле',
12226 	ve:'морскую милю',
12227 	te:'морской милей',
12228 	pe:'морской миле',
12229 	im:'морские мили',
12230 	rm:'морских миль',
12231 	dm:'морским милям',
12232 	vm:'морские мили',
12233 	tm:'морскими милями',
12234 	pm:'морских милях',
12235 	rod:1,
12236 	odu:0,
12237 };
12238 lx['наименьшее значение']={
12239 	ie:'наименьшее значение',
12240 	re:'наименьшего значения',
12241 	de:'наименьшему значению',
12242 	ve:'наименьшее значение',
12243 	te:'наименьшим значением',
12244 	pe:'наименьшем значении',
12245 	im:'наименьшие значения',
12246 	rm:'наименьших значений',
12247 	dm:'наименьшим значениям',
12248 	vm:'наименьшие значения',
12249 	tm:'наименьшими значениями',
12250 	pm:'наименьших значениях',
12251 	rod:2,
12252 	odu:0,
12253 };
12254 lx['наибольшее значение']={
12255 	ie:'наибольшее значение',
12256 	re:'наибольшего значения',
12257 	de:'наибольшему значению',
12258 	ve:'наибольшее значение',
12259 	te:'наибольшим значением',
12260 	pe:'наибольшем значении',
12261 	im:'наибольшие значения',
12262 	rm:'наибольших значений',
12263 	dm:'наибольшим значениям',
12264 	vm:'наибольшие значения',
12265 	tm:'наибольшими значениями',
12266 	pm:'наибольших значениях',
12267 	rod:2,
12268 	odu:0,
12269 };
12270 lx['населённый пункт']={
12271 	ie:'населённый пункт',
12272 	re:'населённого пункта',
12273 	de:'населённому пункту',
12274 	ve:'населённый пункт',
12275 	te:'населённым пунктом',
12276 	pe:'населённом пункте',
12277 	im:'населённые пункты',
12278 	rm:'населённых пунктов',
12279 	dm:'населённым пунктам',
12280 	vm:'населённые пункты',
12281 	tm:'населёнными пунктами',
12282 	pm:'населённых пунктах',
12283 	r2:'населённых пункта',
12284 	rod:0,
12285 	odu:0,
12286 };
12287 lx['настольный теннис']={
12288 	ie:'настольный теннис',
12289 	re:'настольного тенниса',
12290 	de:'настольному теннису',
12291 	ve:'настольный теннис',
12292 	te:'настольным теннисом',
12293 	pe:'настольном теннисе',
12294 	im:'настольные теннисы',
12295 	rm:'настольных теннисов',
12296 	dm:'настольным теннисам',
12297 	vm:'настольные теннисы',
12298 	tm:'настольными теннисами',
12299 	pm:'настольных теннисах',
12300 	rod:0,
12301 	odu:0,
12302 };
12303 lx['оконная рама']={
12304 	ie:'оконная рама',
12305 	re:'оконной рамы',
12306 	de:'оконной раме',
12307 	ve:'оконную раму',
12308 	te:'оконной рамой',
12309 	pe:'оконной раме',
12310 	im:'оконные рамы',
12311 	rm:'оконных рам',
12312 	dm:'оконным рамам',
12313 	vm:'оконные рамы',
12314 	tm:'оконными рамами',
12315 	pm:'оконных рамах',
12316 	rod:1,
12317 	odu:0,
12318 };
12319 lx['открытый луч']={
12320 	ie:'открытый луч',
12321 	re:'открытого луча',
12322 	de:'открытому лучу',
12323 	ve:'открытый луч',
12324 	te:'открытым лучом',
12325 	pe:'открытом луче',
12326 	im:'открытые лучы',
12327 	rm:'открытых лучей',
12328 	dm:'открытым лучам',
12329 	vm:'открытые лучи',
12330 	tm:'открытыми лучами',
12331 	pm:'открытых лучах',
12332 	rod:0,
12333 	odu:0,
12334 };
12335 lx['прогулочное судно']={
12336 	ie:'прогулочное судно',
12337 	re:'прогулочного судна',
12338 	de:'прогулочному судну',
12339 	ve:'прогулочное судно',
12340 	te:'прогулочным судном',
12341 	pe:'прогулочном судне',
12342 	im:'прогулочные суда',
12343 	rm:'прогулочных судов',
12344 	dm:'прогулочным судам',
12345 	vm:'прогулочные суда',
12346 	tm:'прогулочными судами',
12347 	pm:'прогулочных судах',
12348 	rod:2,
12349 	odu:0,
12350 };
12351 lx['русская миля']={
12352 	ie:'русская миля',
12353 	re:'русской мили',
12354 	de:'русской миле',
12355 	ve:'русскую милю',
12356 	te:'русской милей',
12357 	pe:'русской миле',
12358 	im:'русские мили',
12359 	rm:'русских миль',
12360 	dm:'русским милям',
12361 	vm:'русские мили',
12362 	tm:'русскими милями',
12363 	pm:'русских милях',
12364 	rod:1,
12365 	odu:0,
12366 };
12367 lx['сборник тестов для подготовки к ЕГЭ']={
12368 	ie:'сборник тестов для подготовки к ЕГЭ',
12369 	re:'сборника тестов для подготовки к ЕГЭ',
12370 	de:'сборнику тестов для подготовки к ЕГЭ',
12371 	ve:'сборник тестов для подготовки к ЕГЭ',
12372 	te:'сборником тестов для подготовки к ЕГЭ',
12373 	pe:'сборнике тестов для подготовки к ЕГЭ',
12374 	im:'сборники тестов для подготовки к ЕГЭ',
12375 	rm:'сборников тестов для подготовки к ЕГЭ',
12376 	dm:'сборникам тестов для подготовки к ЕГЭ',
12377 	vm:'сборники тестов для подготовки к ЕГЭ',
12378 	tm:'сборниками тестов для подготовки к ЕГЭ',
12379 	pm:'сборниках тестов для подготовки к ЕГЭ',
12380 	rod:0,
12381 	odu:0,
12382 };
12383 lx['скромный библиотекарь']={
12384 	ie:'скромный библиотекарь',
12385 	re:'скромного библиотекаря',
12386 	de:'скромному библиотекарю',
12387 	ve:'скромного библиотекаря',
12388 	te:'скромным библиотекарем',
12389 	pe:'скромном библиотекаре',
12390 	im:'скромные библиотекари',
12391 	rm:'скромных библиотекарей',
12392 	dm:'скромным библиотекарям',
12393 	vm:'скромных библиотекарей',
12394 	tm:'скромными библиотекарями',
12395 	pm:'скромных библиотекарях',
12396 	rod:0,
12397 	odu:0,
12398 };
12399 lx['суровая воронежская хакерша']={
12400 	ie:'суровая воронежская хакерша',
12401 	re:'суровой воронежской хакерши',
12402 	de:'суровой воронежской хакерше',
12403 	ve:'суровую воронежскую хакершу',
12404 	te:'суровой воронежской хакершой',
12405 	pe:'суровой воронежской хакерше',
12406 	im:'суровые воронежские хакерши',
12407 	rm:'суровых воронежских хакерш',
12408 	dm:'суровым воронежским хакершам',
12409 	vm:'суровых воронежских хакерш',
12410 	tm:'суровыми воронежскими хакершами',
12411 	pm:'суровых воронежских хакершах',
12412 	rod:1,
12413 	odu:0,
12414 };
12415 lx['точка минимума']={
12416 	ie:'точка минимума',
12417 	re:'точки минимума',
12418 	de:'точке минимума',
12419 	ve:'точку минимума',
12420 	te:'точкой минимума',
12421 	pe:'точке минимума',
12422 	im:'точки минимума',
12423 	rm:'точек минимума',
12424 	dm:'точкам минимума',
12425 	vm:'точки минимума',
12426 	tm:'точками минимума',
12427 	pm:'точках минимума',
12428 	rod:1,
12429 	odu:0,
12430 };
12431 lx['точка максимума']={
12432 	ie:'точка максимума',
12433 	re:'точки максимума',
12434 	de:'точке максимума',
12435 	ve:'точку максимума',
12436 	te:'точкой максимума',
12437 	pe:'точке максимума',
12438 	im:'точки максимума',
12439 	rm:'точек максимума',
12440 	dm:'точкам максимума',
12441 	vm:'точки максимума',
12442 	tm:'точками максимума',
12443 	pm:'точках максимума',
12444 	rod:1,
12445 	odu:0,
12446 };
12447 lx['тяжелая атлетика']={
12448 	ie:'тяжелая атлетика',
12449 	re:'тяжелой атлетики',
12450 	de:'тяжелой атлетике',
12451 	ve:'тяжелую атлетику',
12452 	te:'тяжелой атлетикой',
12453 	pe:'тяжелой атлетике',
12454 	im:'тяжелые атлетики',
12455 	rm:'тяжелых атлетик',
12456 	dm:'тяжелым атлетикам',
12457 	vm:'тяжелые атлетики',
12458 	tm:'тяжелыми атлетиками',
12459 	pm:'тяжелых атлетиках',
12460 	rod:1,
12461 	odu:0,
12462 };
12463 lx['упаковка сока']={
12464 	ie:'упаковка сока',
12465 	re:'упаковки сока',
12466 	de:'упаковке сока',
12467 	ve:'упаковку сока',
12468 	te:'упаковкой сока',
12469 	pe:'упаковке сока',
12470 	im:'упаковки сока',
12471 	rm:'упаковок сока',
12472 	dm:'упаковкам сока',
12473 	vm:'упаковки сока',
12474 	tm:'упаковками сока',
12475 	pm:'упаковках сока',
12476 	rod:1,
12477 	odu:0,
12478 };
12479 lx['флакон шампуня']={
12480 	ie:'флакон шампуня',
12481 	re:'флакона шампуня',
12482 	de:'флакону шампуня',
12483 	ve:'флакон шампуня',
12484 	te:'флаконом шампуня',
12485 	pe:'флаконе шампуня',
12486 	im:'флаконы шампуня',
12487 	rm:'флаконов шампуня',
12488 	dm:'флаконам шампуня',
12489 	vm:'флаконы шампуня',
12490 	tm:'флаконами шампуня',
12491 	pm:'флаконах шампуня',
12492 	rod:0,
12493 	odu:0,
12494 };
12495 lx['фунт стерлингов']={
12496 	ie:'фунт стерлингов',
12497 	re:'фунта стерлингов',
12498 	de:'фунту стерлингов',
12499 	ve:'фунт стерлингов',
12500 	te:'фунтом стерлингов',
12501 	pe:'фунте стерлингов',
12502 	im:'фунты стерлингов',
12503 	rm:'фунтов стерлингов',
12504 	dm:'фунтам стерлингов',
12505 	vm:'фунты стерлингов',
12506 	tm:'фунтами стерлингов',
12507 	pm:'фунтах стерлингов',
12508 	rod:0,
12509 	skl:2,
12510 	odu:0,
12511 };
12512 lx['цветочный горшок']={
12513 	ie:'цветочный горшок',
12514 	re:'цветочного горшка',
12515 	de:'цветочному горшку',
12516 	ve:'цветочный горшок',
12517 	te:'цветочным горшком',
12518 	pe:'цветочном горшке',
12519 	im:'цветочные горшки',
12520 	rm:'цветочных горшков',
12521 	dm:'цветочным горшкам',
12522 	vm:'цветочные горшки',
12523 	tm:'цветочными горшками',
12524 	pm:'цветочных горшках',
12525 	rod:0,
12526 	skl:2,
12527 	odu:0,
12528 };
12529 //}}Словосочетания с главным словом - существительным
12530 
12531 ////////////////////////////////////////////////////////////////////////
12532 var lxskl=[];	//Объявляем глобальный объект lxskl - типичные окончания
12533 ////////////////////////////////////////////////////////////////////////
12534 var lxpad={ie:1,re:1,de:1,ve:1,te:1,pe:1,im:1,rm:1,dm:1,vm:1,tm:1,pm:1,};
12535 
12536 //Пустой шаблон
12537 
12538 lxskl['']={
12539 	ie:'',
12540 	re:'',
12541 	de:'',
12542 	ve:'',
12543 	te:'',
12544 	pe:'',
12545 	im:'',
12546 	rm:'',
12547 	dm:'',
12548 	vm:'',
12549 	tm:'',
12550 	pm:'',
12551 	rod:0,
12552 	skl:2,
12553 	odu:0,
12554 };
12555 //Первое склонение. Род считаем женским, если что, ставим вручную.
12556 {
12557 lxskl['я']={
12558 	ie:'я',
12559 	re:'и',
12560 	de:'е',
12561 	ve:'ю',
12562 	te:'ей',
12563 	pe:'е',
12564 	im:'и',
12565 	rm:'',
12566 	dm:'ям',
12567 	vm:'и',
12568 	tm:'ями',
12569 	pm:'ях',
12570 	rod:1,
12571 	skl:1,
12572 	odu:0,
12573 };
12574 lxskl['а']={
12575 	ie:'а',
12576 	re:'ы',
12577 	de:'е',
12578 	ve:'у',
12579 	te:'ой',
12580 	pe:'е',
12581 	im:'ы',
12582 	rm:'',
12583 	dm:'ам',
12584 	vm:'ы',
12585 	tm:'ами',
12586 	pm:'ах',
12587 	rod:1,
12588 	skl:1,
12589 	odu:0,
12590 };
12591 ['ж','ш','ч','щ','к','х','г'].map(function(a){
12592 	lxskl[a+'а']={
12593 		ie:a+'а',
12594 		re:a+'и',
12595 		de:a+'е',
12596 		ve:a+'у',
12597 		te:a+'ой',
12598 		pe:a+'е',
12599 		im:a+'и',
12600 		rm:a+'',
12601 		dm:a+'ам',
12602 		vm:a+'и',
12603 		tm:a+'ами',
12604 		pm:a+'ах',
12605 		rod:1,
12606 		skl:1,
12607 		odu:0,
12608 	}; 
12609 });
12610 ['ж','ш','ч'].map(function(a){
12611 	lxskl[a+'ка']={
12612 		ie:a+'ка',
12613 		re:a+'ки',
12614 		de:a+'ке',
12615 		ve:a+'ку',
12616 		te:a+'кой',
12617 		pe:a+'ке',
12618 		im:a+'ки',
12619 		rm:a+'ек',
12620 		dm:a+'кам',
12621 		vm:a+'ки',
12622 		tm:a+'ками',
12623 		pm:a+'ках',
12624 		rod:1,
12625 		skl:1,
12626 		odu:0,
12627 	}; 	
12628 });
12629 ['б','в','д','з','л','м','н','п','р','с','т'].map(function(a){
12630 	lxskl[a+'ка']={
12631 		ie:a+'ка',
12632 		re:a+'ки',
12633 		de:a+'ке',
12634 		ve:a+'ку',
12635 		te:a+'кой',
12636 		pe:a+'ке',
12637 		im:a+'ки',
12638 		rm:a+'ок',
12639 		dm:a+'кам',
12640 		vm:a+'ки',
12641 		tm:a+'ками',
12642 		pm:a+'ках',
12643 		rod:1,
12644 		skl:1,
12645 		odu:0,
12646 	}; 	
12647 });
12648 lxskl['ия']={
12649 	ie:'ия',
12650 	re:'ии',
12651 	de:'ии',
12652 	ve:'ию',
12653 	te:'ией',
12654 	pe:'ии',
12655 	im:'ии',
12656 	rm:'ий',
12657 	dm:'иям',
12658 	vm:'ии',
12659 	tm:'иями',
12660 	pm:'иях',
12661 	rod:1,
12662 	skl:1,
12663 	odu:0,
12664 };
12665 }
12666 //Второе склонение, средний род
12667 lxskl['ие']={
12668 	ie:'ие',
12669 	re:'ия',
12670 	de:'ию',
12671 	ve:'ие',
12672 	te:'ием',
12673 	pe:'ии',
12674 	im:'ия',
12675 	rm:'ий',
12676 	dm:'иям',
12677 	vm:'ия',
12678 	tm:'иями',
12679 	pm:'иях',
12680 	rod:2,
12681 	skl:2,
12682 	odu:0,
12683 };
12684 ['ё','е'].map(function(a){
12685 	lxskl[a]={
12686 		ie:a,
12687 		re:'я',
12688 		de:'ю',
12689 		ve:a,
12690 		te:'ем',
12691 		pe:'е',
12692 		im:'я',
12693 		rm:'ей',
12694 		dm:'ям',
12695 		vm:'я',
12696 		tm:'ями',
12697 		pm:'ях',
12698 		rod:2,
12699 		skl:2,
12700 		odu:0,
12701 	};
12702 });
12703 
12704 lxskl['о']={
12705 	ie:'о',
12706 	re:'а',
12707 	de:'у',
12708 	ve:'о',
12709 	te:'ом',
12710 	pe:'е',
12711 	im:'а',
12712 	rm:'',
12713 	dm:'ам',
12714 	vm:'а',
12715 	tm:'ами',
12716 	pm:'ах',
12717 	rod:2,
12718 	skl:2,
12719 	odu:0,
12720 };
12721 //Второе склонение, мужской род
12722 lxskl['ий']={
12723 	ie:'ий',
12724 	re:'ия',
12725 	de:'ию',
12726 	ve:'ий',
12727 	te:'ием',
12728 	pe:'ии',
12729 	im:'ии',
12730 	rm:'иев',
12731 	dm:'иям',
12732 	vm:'ии',
12733 	tm:'иями',
12734 	pm:'иях',
12735 	rod:0,
12736 	skl:2,
12737 	odu:0,
12738 };
12739 lxskl['ь']={
12740 	ie:'ь',
12741 	re:'я',
12742 	de:'ю',
12743 	ve:'ь',
12744 	te:'ем',
12745 	pe:'е',
12746 	im:'и',
12747 	rm:'ей',
12748 	dm:'ям',
12749 	vm:'и',
12750 	tm:'ями',
12751 	pm:'ях',
12752 	rod:0,
12753 	skl:2,
12754 	odu:0,
12755 }; 
12756 lxskl['й']={
12757 	ie:'й',
12758 	re:'я',
12759 	de:'ю',
12760 	ve:'й',
12761 	te:'ем',
12762 	pe:'е',
12763 	im:'и',
12764 	rm:'ев',
12765 	dm:'ям',
12766 	vm:'и',
12767 	tm:'ями',
12768 	pm:'ях',
12769 	rod:0,
12770 	skl:2,
12771 	odu:0,
12772 };
12773 ['б','в','д','з','л','м','н','п','р','с','т','ф','ц'].map(function(a){
12774 	lxskl[a]={
12775 		ie:a,
12776 		re:a+'а',
12777 		de:a+'у',
12778 		ve:a,
12779 		te:a+'ом',
12780 		pe:a+'е',
12781 		im:a+'ы',
12782 		rm:a+'ов',
12783 		dm:a+'ам',
12784 		vm:a+'ы',
12785 		tm:a+'ами',
12786 		pm:a+'ах',
12787 		rod:0,
12788 		skl:2,
12789 		odu:0,
12790 	}; 	
12791 });
12792 ['ж','ш','ч','щ','к','х','г'].map(function(a){
12793 	lxskl[a]={
12794 		ie:a,
12795 		re:a+'а',
12796 		de:a+'у',
12797 		ve:a,
12798 		te:a+'ом',
12799 		pe:a+'е',
12800 		im:a+'и',
12801 		rm:a+'ей',
12802 		dm:a+'ам',
12803 		vm:a+'и',
12804 		tm:a+'ами',
12805 		pm:a+'ах',
12806 		rod:0,
12807 		skl:2,
12808 		odu:0,
12809 	}; 
12810 });
12811 lxskl['к'].rm='ков';
12812 lxskl['г'].rm='гов';
12813 lxskl['х'].rm='хов';
12814 
12815 ['ё','е','о'].map(function(a){
12816 	lxskl[a+'к']={
12817 		ie:a+'к',
12818 		re:'ка',
12819 		de:'ку',
12820 		ve:a+'к',
12821 		te:'ком',
12822 		pe:'ке',
12823 		im:'ки',
12824 		rm:'ков',
12825 		dm:'кам',
12826 		vm:'ки',
12827 		tm:'ками',
12828 		pm:'ках',
12829 		rod:0,
12830 		skl:2,
12831 		odu:0,
12832 	};
12833 });
12834 //Костыли
12835 lxskl['0']={
12836 	ie:'',
12837 	re:'',
12838 	de:'',
12839 	ve:'',
12840 	te:'',
12841 	pe:'',
12842 	im:'',
12843 	rm:'',
12844 	dm:'',
12845 	vm:'',
12846 	tm:'',
12847 	pm:'',
12848 	rod:0,
12849 	skl:0,
12850 	odu:0,
12851 };
12852 lxskl['мя']={
12853 	ie:'мя',
12854 	re:'мени',
12855 	de:'мени',
12856 	ve:'мя',
12857 	te:'менем',
12858 	pe:'мени',
12859 	im:'мена',
12860 	rm:'мён',
12861 	dm:'менам',
12862 	vm:'мена',
12863 	tm:'менами',
12864 	pm:'менах',
12865 	rod:0,
12866 	skl:4,
12867 	odu:0,
12868 };
12869 //И отдельный набор костылей для третьего склонения
12870 lxskl['ь3']={
12871 	ie:'ь',
12872 	re:'и',
12873 	de:'и',
12874 	ve:'ь',
12875 	te:'ью',
12876 	pe:'и',
12877 	im:'и',
12878 	rm:'ей',
12879 	dm:'ям',
12880 	vm:'и',
12881 	tm:'ями',
12882 	pm:'ях',
12883 	rod:1,
12884 	skl:3,
12885 	odu:0,
12886 };
12887 ['ж','ш','ч','щ'].map(function(a){
12888 	lxskl[a+'ь']={
12889 		ie:a+'ь',
12890 		re:a+'и',
12891 		de:a+'и',
12892 		ve:a+'ь',
12893 		te:a+'ью',
12894 		pe:a+'и',
12895 		im:a+'и',
12896 		rm:a+'ей',
12897 		dm:a+'ям',
12898 		vm:a+'и',
12899 		tm:a+'ями',
12900 		pm:a+'ях',
12901 		rod:1,
12902 		skl:3,
12903 		odu:0,
12904 	};
12905 });
12906 //Несклоняемые
12907 ['у','ю','э'].map(function(a){
12908 	lxskl[a]={
12909 		ie:a,
12910 		re:a,
12911 		de:a,
12912 		ve:a,
12913 		te:a,
12914 		pe:a,
12915 		im:a,
12916 		rm:a,
12917 		dm:a,
12918 		vm:a,
12919 		tm:a,
12920 		pm:a,
12921 		rod:1,
12922 		skl:1,
12923 		odu:0,
12924 	}; 	
12925 });
12926 
12927 //Субстантивированные - по мере необходмости
12928 lxskl['ый']={
12929 	ie:'ый',
12930 	re:'ого',
12931 	de:'ому',
12932 	ve:'ого',
12933 	te:'ым',
12934 	pe:'ом',
12935 	im:'ые',
12936 	rm:'ых',
12937 	dm:'ым',
12938 	vm:'ых',
12939 	tm:'ыми',
12940 	pm:'ых',
12941 	rod:0,
12942 	skl:5,
12943 	odu:1,
12944 };
12945 lxskl['ыйся']={
12946 	ie:'ыйся',
12947 	re:'огося',
12948 	de:'омуся',
12949 	ve:'огося',
12950 	te:'ымся',
12951 	pe:'омся',
12952 	im:'ыеся',
12953 	rm:'ыхся',
12954 	dm:'ымся',
12955 	vm:'ыхся',
12956 	tm:'ымися',
12957 	pm:'ыхся',
12958 	rod:0,
12959 	skl:5,
12960 	odu:1,
12961 };
12962 lxskl['ийся']={
12963 	ie:'ийся',
12964 	re:'егося',
12965 	de:'емуся',
12966 	ve:'егося',
12967 	te:'имся',
12968 	pe:'емся',
12969 	im:'иеся',
12970 	rm:'ихся',
12971 	dm:'имся',
12972 	vm:'ихся',
12973 	tm:'имися',
12974 	pm:'ихся',
12975 	rod:0,
12976 	skl:5,
12977 	odu:1,
12978 };
12979 
12980 function autosklon(slovo,p1){
12981 	if(slovo.isArray){
12982 		for(var lensl=slovo.length-1;lensl>=0;lensl--)
12983 			autosklon(slovo[lensl],p1);
12984 		return;
12985 	}
12986 	if(lx[slovo])
12987 		return console.log('Такое слово уже есть в словаре.');
12988 	var rez=setlx(slovo);
12989 	if(p1!=undefined)
12990 		slovo+=p1;
12991 	var sl=slovo;
12992 	for(;sl.length && !lx[sl] && !lxskl[sl]; sl=sl.udalPerv()){};
12993 	var lxparent=lx[sl]?lx[sl]:lxskl[sl];
12994 	var osnova=slovo.udalPosl(sl.length);
12995 	for(var padezh in lxpad)
12996 		rez+=logparam(padezh,osnova+lxparent[padezh]);
12997 	rez+=logparam('rod',lxparent.rod);
12998 	rez+=logparam('skl',lxparent.skl);
12999 	rez+=logparam('odu',lxparent.odu);
13000 	rez+='};\n'
13001 	console.log(rez);//Это НЕ ОТЛАДКА!!!
13002 }
13003 
13004 var lxkand=[];
13005 
13006 function sklonlxkand(slovo,p1,al){
13007 	if(slovo.ie)
13008 		return sklonlxkand(slovo.ie,p1,al);
13009 	if(lx[slovo]){
13010 		if(al)
13011 			alert('Такое слово уже есть в словаре.');
13012 		return lx[slovo];
13013 	}
13014 	lxkand[slovo]={};
13015 	if(p1!=undefined)
13016 		slovo+=p1;
13017 	var sl=slovo;
13018 	for(;sl.length && !lx[sl] && !lxskl[sl]; sl=sl.udalPerv()){};
13019 	var lxparent=lx[sl]?lx[sl]:lxskl[sl];
13020 	var osnova=slovo.udalPosl(sl.length);
13021 	lxkand[slovo]=lxparent.clone();
13022 	for(var padezh in lxpad)
13023 		lxkand[slovo][padezh]=osnova+lxparent[padezh];
13024 	lxkand[slovo].chr=1;
13025 	return lxkand[slovo];
13026 }
13027 
13028 var lxdop={
13029 	rod:1,
13030 	skl:1,
13031 	odu:1,
13032 	sbs:1,
13033 	sl:1,
13034 	sr:1,
13035 	pr:1,
13036 	chr:1,
13037 };
13038 
13039 function strlxkand(slovo,p1,al){
13040 	var rez=setlx(slovo);
13041 	var sl;
13042 	if(!lxkand[slovo])
13043 		sl=sklonlxkand(slovo,p1,al).clone();
13044 	else
13045 		sl=lxkand[slovo].clone();
13046 	for(var pad in lxpad){
13047 		rez+=logparam(pad,sl[pad]);
13048 		sl[pad]=undefined;
13049 	}
13050 	for(var pad in lxdop){
13051 		rez+=logparam(pad,sl[pad]);
13052 		sl[pad]=undefined;
13053 	}
13054 	for(var pad in sl)
13055 		rez+=logparam(pad,sl[pad]);
13056 	rez+='};\n';
13057 	return rez;
13058 }
13059 
13060 function loglxkand(slovo,p1){
13061 	console.log(strlxkand(slovo,p1,1));
13062 }
13063 
13064 function setlx(p1){
13065 	return('\nlx[\''+p1+'\']={\n');
13066 }
13067 
13068 function logparam(p1,p2){
13069 	return p2!=undefined? 
13070 		p2.isString?
13071 			('\t'+p1+':\''+p2+'\',\n'):
13072 			('\t'+p1+':'+p2+',\n')
13073 		:'';
13074 }
13075 
13076 function logsklon(a){
13077 	if(slovo.isArray){
13078 		for(var lensl=slovo.length-1;lensl>=0;lensl--)
13079 			logsklon(slovo[lensl],p1);
13080 		return;
13081 	}
13082 	console.log(sklon(a))
13083 }
13084 
13085 function sklon(a){
13086 	setlx(a);
13087 	var osn;//"Основа" слова. Выбирается так, чтобы было удобно.
13088 	var rez='';//То, что отправим в результат. Например, в консоль.
13089 	rez+=setlx(a);
13090 	if(a.posl()=='а'){
13091 		osn=a.udalPosl();
13092 		rez+=logparam('ie',a);
13093 		rez+=logparam('re',osn+'ы');
13094 		rez+=logparam('de',osn+'е');
13095 		rez+=logparam('ve',osn+'у');
13096 		rez+=logparam('te',osn+'ой');
13097 		rez+=logparam('pe',osn+'е');
13098 		rez+=logparam('im',osn+'ы');
13099 		rez+=logparam('rm',osn);
13100 		rez+=logparam('dm',osn+'ам');
13101 		rez+=logparam('vm',osn+'ы');
13102 		rez+=logparam('tm',osn+'ами');
13103 		rez+=logparam('pm',osn+'ах');
13104 		rez+=logparam('rod',1);
13105 		rez+=logparam('skl',1);
13106 		rez+=logparam('odu',0);
13107 	}else
13108 	if(a.posl()=='ь'){
13109 		osn=a.udalPosl();
13110 		rez+=logparam('ie',a);
13111 		rez+=logparam('re',osn+'я');
13112 		rez+=logparam('de',osn+'ю');
13113 		rez+=logparam('ve',a);
13114 		rez+=logparam('te',osn+'ем');
13115 		rez+=logparam('pe',osn+'е');
13116 		rez+=logparam('im',osn+'и');
13117 		rez+=logparam('rm',osn+'ей');
13118 		rez+=logparam('dm',osn+'ям');
13119 		rez+=logparam('vm',osn+'и');
13120 		rez+=logparam('tm',osn+'ями');
13121 		rez+=logparam('pm',osn+'ях');
13122 		rez+=logparam('rod',0);
13123 		rez+=logparam('skl',2);
13124 		rez+=logparam('odu',0);
13125 	}else
13126 	{
13127 		osn=a;
13128 		rez+=logparam('ie',a);
13129 		rez+=logparam('re',osn+'а');
13130 		rez+=logparam('de',osn+'у');
13131 		rez+=logparam('ve',a);
13132 		rez+=logparam('te',osn+'ом');
13133 		rez+=logparam('pe',osn+'е');
13134 		rez+=logparam('im',osn+'ы');
13135 		rez+=logparam('rm',osn+'ов');
13136 		rez+=logparam('dm',osn+'ам');
13137 		rez+=logparam('vm',osn+'ы');
13138 		rez+=logparam('tm',osn+'ами');
13139 		rez+=logparam('pm',osn+'ах');
13140 		rez+=logparam('rod',0);
13141 		rez+=logparam('skl',2);
13142 		rez+=logparam('odu',0);
13143 	}
13144 	rez+='};\n'
13145 	return rez;
13146 }
13147 lx['один']={
13148 	chr:2,
13149 	i:'один',
13150 	r:'одного',
13151 	d:'одному',
13152 	v:'один',
13153 	t:'одним',
13154 	p:'одном',
13155 };
13156 lx['одна']={
13157 	chr:2,
13158 	i:'одна',
13159 	r:'одной',
13160 	d:'одной',
13161 	v:'одну',
13162 	t:'одной',
13163 	p:'одной',
13164 };
13165 lx['одно']={
13166 	chr:2,
13167 	i:'одно',
13168 	r:'одного',
13169 	d:'одному',
13170 	v:'одно',
13171 	t:'одним',
13172 	p:'одном',
13173 };
13174 lx['одни']={
13175 	chr:2,
13176 	i:'одни',
13177 	r:'одних',
13178 	d:'одним',
13179 	v:'одни',
13180 	t:'одними',
13181 	p:'одних',
13182 };
13183 lx['две']={
13184 	chr:2,
13185 	i:'две',
13186 	r:'двух',
13187 	d:'двум',
13188 	v:'две',
13189 	t:'двумя',
13190 	p:'двух',
13191 };
13192 lx['два']={
13193 	chr:2,
13194 	i:'два',
13195 	r:'двух',
13196 	d:'двум',
13197 	v:'два',
13198 	t:'двумя',
13199 	p:'двух',
13200 };
13201 lx['три']={
13202 	chr:2,
13203 	i:'три',
13204 	r:'трёх',
13205 	d:'трём',
13206 	v:'три',
13207 	t:'тремя',
13208 	p:'трех',
13209 };
13210 lx['четыре']={
13211 	chr:2,
13212 	i:'четыре',
13213 	r:'четырёх',
13214 	d:'четырём',
13215 	v:'четыре',
13216 	t:'четырьмя',
13217 	p:'четырёх',
13218 };
13219 lx['пять']={
13220 	chr:2,
13221 	i:'пять',
13222 	r:'пяти',
13223 	d:'пяти',
13224 	v:'пять',
13225 	t:'пятью',
13226 	p:'пяти',
13227 };
13228 lx['шесть']={
13229 	chr:2,
13230 	i:'шесть',
13231 	r:'шести',
13232 	d:'шести',
13233 	v:'шесть',
13234 	t:'шестью',
13235 	p:'шести',
13236 };
13237 lx['семь']={
13238 	chr:2,
13239 	i:'семь',
13240 	r:'семи',
13241 	d:'семи',
13242 	v:'семь',
13243 	t:'семью',
13244 	p:'семи',
13245 };
13246 lx['восемь']={
13247 	chr:2,
13248 	i:'восемь',
13249 	r:'восьми',
13250 	d:'восьми',
13251 	v:'восемь',
13252 	t:'восемью',
13253 	p:'восьми',
13254 };
13255 lx['девять']={
13256 	chr:2,
13257 	i:'девять',
13258 	r:'девяти',
13259 	d:'девяти',
13260 	v:'девять',
13261 	t:'девятью',
13262 	p:'девяти',
13263 };
13264 lx['десять']={
13265 	chr:2,
13266 	i:'десять',
13267 	r:'десяти',
13268 	d:'десяти',
13269 	v:'десять',
13270 	t:'десятью',
13271 	p:'десяти',
13272 };
13273 lx['одиннадцать']={
13274 	chr:2,
13275 	i:'одиннадцать',
13276 	r:'одиннадцати',
13277 	d:'одиннадцати',
13278 	v:'одиннадцать',
13279 	t:'одиннадцатью',
13280 	p:'одиннадцати',
13281 };
13282 lx['двенадцать']={
13283 	chr:2,
13284 	i:'двенадцать',
13285 	r:'двенадцати',
13286 	d:'двенадцати',
13287 	v:'двенадцать',
13288 	t:'двенадцатью',
13289 	p:'двенадцати',
13290 };
13291 lx['тринадцать']={
13292 	chr:2,
13293 	i:'тринадцать',
13294 	r:'тринадцати',
13295 	d:'тринадцати',
13296 	v:'тринадцать',
13297 	t:'тринадцатью',
13298 	p:'тринадцати',
13299 };
13300 lx['четырнадцать']={
13301 	chr:2,
13302 	i:'четырнадцать',
13303 	r:'четырнадцати',
13304 	d:'четырнадцати',
13305 	v:'четырнадцать',
13306 	t:'четырнадцатью',
13307 	p:'четырнадцати',
13308 };
13309 lx['пятнадцать']={
13310 	chr:2,
13311 	i:'пятнадцать',
13312 	r:'пятнадцати',
13313 	d:'пятнадцати',
13314 	v:'пятнадцать',
13315 	t:'пятнадцатью',
13316 	p:'пятнадцати',
13317 };
13318 lx['шестнадцать']={
13319 	chr:2,
13320 	i:'шестнадцать',
13321 	r:'шестнадцати',
13322 	d:'шестнадцати',
13323 	v:'шестнадцать',
13324 	t:'шестнадцатью',
13325 	p:'шестнадцати',
13326 };
13327 lx['семнадцать']={
13328 	chr:2,
13329 	i:'семнадцать',
13330 	r:'семнадцати',
13331 	d:'семнадцати',
13332 	v:'семнадцать',
13333 	t:'семнадцатью',
13334 	p:'семнадцати',
13335 };
13336 lx['восемнадцать']={
13337 	chr:2,
13338 	i:'восемнадцать',
13339 	r:'восемнадцати',
13340 	d:'восемнадцати',
13341 	v:'восемнадцать',
13342 	t:'восемнадцатью',
13343 	p:'восемнадцати',
13344 };
13345 lx['девятнадцать']={
13346 	chr:2,
13347 	i:'девятнадцать',
13348 	r:'девятнадцати',
13349 	d:'девятнадцати',
13350 	v:'девятнадцать',
13351 	t:'девятнадцатью',
13352 	p:'девятнадцати',
13353 };
13354 lx['двадцать']={
13355 	chr:2,
13356 	i:'двадцать',
13357 	r:'двадцати',
13358 	d:'двадцати',
13359 	v:'двадцать',
13360 	t:'двадцатью',
13361 	p:'двадцати',
13362 };
13363 lx['тридцать']={
13364 	chr:2,
13365 	i:'тридцать',
13366 	r:'тридцати',
13367 	d:'тридцати',
13368 	v:'тридцать',
13369 	t:'тридцатью',
13370 	p:'тридцати',
13371 };
13372 lx['сорок']={
13373 	chr:2,
13374 	i:'сорок',
13375 	r:'сорока',
13376 	d:'сорока',
13377 	v:'сорок',
13378 	t:'сорока',
13379 	p:'сорока',
13380 };
13381 lx['пятьдесят']={
13382 	chr:2,
13383 	i:'пятьдесят',
13384 	r:'пятидесяти',
13385 	d:'пятидесяти',
13386 	v:'пятьдесят',
13387 	t:'пятьюдесятью',
13388 	p:'пятидесяти',
13389 };
13390 lx['шестьдесят']={
13391 	chr:2,
13392 	i:'шестьдесят',
13393 	r:'шестидесяти',
13394 	d:'шестидесяти',
13395 	v:'шестьдесят',
13396 	t:'шестьюдесятью',
13397 	p:'шестидесяти',
13398 };
13399 lx['семьдесят']={
13400 	chr:2,
13401 	i:'семьдесят',
13402 	r:'семидесяти',
13403 	d:'семидесяти',
13404 	v:'семьдесят',
13405 	t:'семьюдесятью',
13406 	p:'семидесяти',
13407 };
13408 lx['восемьдесят']={
13409 	chr:2,
13410 	i:'восемьдесят',
13411 	r:'восьмидесяти',
13412 	d:'восьмидесяти',
13413 	v:'восемьдесят',
13414 	t:'восемьюдесятью',
13415 	p:'восьмидесяти',
13416 };
13417 lx['девяносто']={
13418 	chr:2,
13419 	i:'девяносто',
13420 	r:'девяноста',
13421 	d:'девяноста',
13422 	v:'девяносто',
13423 	t:'девяноста',
13424 	p:'девяноста',
13425 };
13426 lx['сто']={
13427 	chr:2,
13428 	i:'сто',
13429 	r:'ста',
13430 	d:'ста',
13431 	v:'сто',
13432 	t:'ста',
13433 	p:'ста',
13434 };
13435 lx['двести']={
13436 	chr:2,
13437 	i:'двести',
13438 	r:'двухсот',
13439 	d:'двумстам',
13440 	v:'двести',
13441 	t:'двумястами',
13442 	p:'двухстах',
13443 };
13444 lx['триста']={
13445 	chr:2,
13446 	i:'триста',
13447 	r:'трёхсот',
13448 	d:'трёмстам',
13449 	v:'триста',
13450 	t:'тремястами',
13451 	p:'трёхстах',
13452 };
13453 lx['четыреста']={
13454 	chr:2,
13455 	i:'четыреста',
13456 	r:'четырёхсот',
13457 	d:'четырёмстам',
13458 	v:'четыреста',
13459 	t:'четырьмястами',
13460 	p:'четырёхстах',
13461 };
13462 lx['пятьсот']={
13463 	chr:2,
13464 	i:'пятьсот',
13465 	r:'пятисот',
13466 	d:'пятистам',
13467 	v:'пятьсот',
13468 	t:'пятьюстами',
13469 	p:'пятистах',
13470 };
13471 lx['шестьсот']={
13472 	chr:2,
13473 	i:'шестьсот',
13474 	r:'шестисот',
13475 	d:'шестистам',
13476 	v:'шестьсот',
13477 	t:'шестьюстами',
13478 	p:'шестистах',
13479 };
13480 lx['семьсот']={
13481 	chr:2,
13482 	i:'семьсот',
13483 	r:'семисот',
13484 	d:'семистам',
13485 	v:'семисот',
13486 	t:'семьюстами',
13487 	p:'семистах',
13488 };
13489 lx['восемьсот']={
13490 	chr:2,
13491 	i:'восемьсот',
13492 	r:'восьмисот',
13493 	d:'восьмистам',
13494 	v:'восемьсот',
13495 	t:'восемьюстами',
13496 	p:'восьмистах',
13497 };
13498 lx['девятьсот']={
13499 	chr:2,
13500 	i:'девятьсот',
13501 	r:'девятисот',
13502 	d:'девятистам',
13503 	v:'девятьсот',
13504 	t:'девятьюстами',
13505 	p:'девятистах',
13506 };
13507 lx['тысяча']={
13508 	chr:2,
13509 	i:'тысяча',
13510 	r:'тысячи',
13511 	d:'тысяче',
13512 	v:'тысячу',
13513 	t:'тысячей',
13514 	p:'тысяче',
13515 };
13516 lx['тысячи']={
13517 	chr:2,
13518 	i:'тысячи',
13519 	r:'тысяч',
13520 	d:'тысячам',
13521 	v:'тысячи',
13522 	t:'тысячами',
13523 	p:'тысячах',
13524 };
13525 lx['миллион']={
13526 	chr:2,
13527 	i:'миллион',
13528 	r:'миллиона',
13529 	d:'миллиону',
13530 	v:'миллион',
13531 	t:'миллионом',
13532 	p:'миллионе',
13533 };
13534 lx['миллионы']={
13535 	chr:2,
13536 	i:'миллионы',
13537 	r:'миллионов',
13538 	d:'миллионам',
13539 	v:'миллионы',
13540 	t:'миллионами',
13541 	p:'миллионах',
13542 };
13543 lx['миллиард']={
13544 	chr:2,
13545 	i:'миллиард',
13546 	r:'миллиарда',
13547 	d:'миллиарду',
13548 	v:'миллиард',
13549 	t:'миллиардом',
13550 	p:'миллиарде',
13551 };
13552 lx['миллиарды']={
13553 	chr:2,
13554 	i:'миллиарды',
13555 	r:'миллиардов',
13556 	d:'миллиардам',
13557 	v:'миллиарды',
13558 	t:'миллиардами',
13559 	p:'миллиардах',
13560 };
13561 lx['двое']={
13562 	chr:2,
13563 	i:'двое',
13564 	r:'двоих',
13565 	d:'двоим',
13566 	v:'двое',
13567 	t:'двоими',
13568 	p:'двоих',
13569 };
13570 lx['трое']={
13571 	chr:2,
13572 	i:'трое',
13573 	r:'троих',
13574 	d:'троим',
13575 	v:'трое',
13576 	t:'троими',
13577 	p:'троих',
13578 };
13579 lx['четверо']={
13580 	chr:2,
13581 	i:'четверо',
13582 	r:'четверых',
13583 	d:'четверым',
13584 	v:'четверо',
13585 	t:'четверыми',
13586 	p:'четверых',
13587 };
13588 lx['пятеро']={
13589 	chr:2,
13590 	i:'пятеро',
13591 	r:'пятерых',
13592 	d:'пятерым',
13593 	v:'пятеро',
13594 	t:'пятерыми',
13595 	p:'пятерых',
13596 }; 
13597 lx['шестеро']={
13598 	chr:2,
13599 	i:'шестеро',
13600 	r:'шестерых',
13601 	d:'шестерым',
13602 	v:'шестеро',
13603 	t:'шестерыми',
13604 	p:'шестерых',
13605 };
13606 lx['семеро']={
13607 	chr:2,
13608 	i:'семеро',
13609 	r:'семерых',
13610 	d:'семерым',
13611 	v:'семеро',
13612 	t:'семерыми',
13613 	p:'семерых',
13614 };
13615 lx['восьмеро']={
13616 	chr:2,
13617 	i:'восьмеро',
13618 	r:'восьмерых',
13619 	d:'восьмерым',
13620 	v:'восьмеро',
13621 	t:'восьмерыми',
13622 	p:'восьмерых',
13623 };
13624 lx['девятеро']={
13625 	chr:2,
13626 	i:'девятеро',
13627 	r:'девятерых',
13628 	d:'девятерым',
13629 	v:'девятеро',
13630 	t:'девятерыми',
13631 	p:'девятерых',
13632 };
13633 lx['десятеро']={
13634 	chr:2,
13635 	i:'десятеро',
13636 	r:'десятерых',
13637 	d:'десятерым',
13638 	v:'десятеро',
13639 	t:'десятерыми',
13640 	p:'десятерых',
13641 };
13642 //http://pastebin.com/Dpv8pQWW - Любовь Ерышова
13643 //http://pastebin.com/jJ8CWxd0 - Екатерина Трегубова
13644 //+Николай Авдеев
13645 
13646 function Complex(re,im){
13647 	this.re=+re?+re:0;
13648 	this.im=+im?+im:0;
13649 	this.isComplex=1;
13650 	this.toString=function(){
13651 	/**Представляет число в виде a+bi*/
13652 		var rez;
13653 		if(!this.re && !this.im)
13654 			rez='0';
13655 		else if( this.re && !this.im)
13656 			rez=''+this.re;
13657 		else if(!this.re &&  this.im)
13658 			rez=''+this.im+'i';
13659 		else if( this.re &&  this.im)
13660 			rez= ''+this.re+'+'+this.im+'i';
13661 		return rez.plusminus();
13662 	}
13663 	this.ts=function(){
13664 		return this.toString().ts();
13665 	}
13666 
13667 	this.minus=function(){
13668 	/**Противоположное число: -a-bi*/
13669 		return new Complex( -(this.re), - (this.im));
13670 	}
13671 
13672 	this.sopr=function(){
13673 	/**Сопряжёное число: a-bi*/
13674 		return new Complex(this.re, - (this.im));
13675 	}
13676 
13677 	this.abs=
13678 	this.norma=function(){
13679 	/**Норма (модуль, абсолютное значение) комплексного числа*/
13680 		return (this.re.sqr()+this.im.sqr()).sqrt();
13681 	}
13682 
13683 	this.obrat=function(){
13684 	/**Обратное число: a-bi*/
13685 		var n=this.norma().sqr();
13686 		return new Complex(this.re/n, - (this.im)/n);
13687 	}
13688 	
13689 	this.sum=function(){
13690 	/**Прибавить к комплексному числу комплексные или действительные*/
13691 		var rez=this.clone();
13692 //		arguments[0].isComplex?arguments[0].clone():new Complex(arguments[0]);
13693 		for(var i=arguments.length-1;i>=0;i--){
13694 			var operand=arguments[i];
13695 			if(operand.isNumber){
13696 				rez.re+=operand;
13697 			}else{
13698 				if(operand.re){
13699 					rez.re+=operand.re;
13700 				}
13701 				if(operand.im){
13702 					rez.im+=operand.im;
13703 				}
13704 			}
13705 		}
13706 		return rez;
13707 	}
13708 
13709 	this.umn=function(){
13710 	/**Умножить комплексное число на комплексные или действительные*/
13711 		var rez=this.clone();
13712 		for(var i=arguments.length-1;i>=0;i--){
13713 			var operand=arguments[i];
13714 			if(operand.isNumber){
13715 				if(operand===0){
13716 					return new Complex();
13717 				}
13718 				rez.re*=operand;
13719 				rez.im*=operand;
13720 			}else{
13721 				if(!operand.re && !operand.im){
13722 					//Нуль
13723 					return new Complex();
13724 				}else{
13725 					var r=rez.re,
13726 						m=rez.im;
13727 					rez.re=r*operand.re-m*operand.im;
13728 					rez.im=r*operand.im+m*operand.re;
13729 				} 
13730 			}
13731 		}
13732 		return rez;
13733 	}
13734 }
13735 //Синонимы функций: сокращение, транслит, антитранслит и тому подобное
13736 
13737 //Для func.js
13738 var sl=sluchch;
13739 
13740 //Для прототипных
13741 String.prototype.ts=String.prototype.toStandart;
13742 /*Функции, использующие jquery и другие внешние библиотеки*/
13743 
13744 function allCanvasToBackgroundImage(){
13745 	$('canvas').each(function(){
13746 		if(!this.style.backgroundImage)
13747 			this.style.backgroundImage='url('+this.toDataURL()+')';
13748 //		this.width=this.width;
13749 	});
13750 }
13751 
13752 function spoiler(){
13753 	$('.spoiler-body').hide();
13754 	$('.spoiler-hide').hide();
13755 	$('.spoiler-show').click(function(){
13756 		$(this).next().toggle();
13757 		$(this).next().next().slideToggle();
13758 		$(this).hide();
13759 	});
13760 	$('.spoiler-hide').click(function(){
13761 		$(this).next().slideToggle();
13762 		$(this).prev().toggle();
13763 		$(this).hide();
13764 	});
13765 }
13766 
13767 function allLinksToBlankTarget(){
13768 	$('a').each(function(){
13769 		this.dataOldTarget=this.target;
13770 		this.target="_blank";
13771 	});
13772 }
13773 
13774 function restoreLinksTarget(){
13775 	$('a').each(function(){
13776 		this.target=this.dataOldTarget;
13777 	});
13778 }
13779 
13780 function innerHTMLtoImg(elem){
13781 	html2canvas(elem, {
13782 		onrendered: function(canvas) {
13783 			var img=document.createElement('img');
13784 			img.src=canvas.toDataURL();
13785 			img.width=canvas.width;
13786 			img.height=canvas.height;
13787 			elem.innerHTML='';
13788 			elem.appendChild(img);
13789 		}
13790 	});
13791 }
13792 
13793 function replaceWithImg(elem){
13794 	html2canvas(elem, {
13795 		onrendered: function(canvas) {
13796 			var img=document.createElement('img');
13797 			img.src=canvas.toDataURL();
13798 			img.width=canvas.width;
13799 			img.height=canvas.height;
13800 			$(elem).replaceWith(img);
13801 		}
13802 	});
13803 }
13804 
13805 function allLinksToSpans(){
13806 	$('a').each(function(){
13807 		if(this.target=="_blank"){
13808 			$(this).replaceWith('<span class="spanlink" onclick="linkSpan(\''+
13809 				this.href.replace(/\/\/|https*:\/\//,'_')+'\',1);">'+this.innerHTML+'</span>');
13810 		}else{
13811 			$(this).replaceWith('<span class="spanlink" onclick="linkSpan(\''+
13812 				this.href.replace(/\/\/|https*:\/\//,'_')+'\');">'+this.innerHTML+'</span>');
13813 		}
13814 	});
13815 }
13816 
13817 var umka;
13818 
13819 function zagrUmka(){
13820 	umka=$.jStorage.get('umka'+nabor.name);
13821 	if(!umka)
13822 		pustUmka();
13823 	if(!umka.vremya)
13824 		umka.vremya=[];
13825 	if(!umka.kvoNaVremya)
13826 		umka.kvoNaVremya=[];
13827 	for(var i=1;i<=nabor.nZad;i++){
13828 		if(!umka.verno[i])
13829 			umka.verno[i]=0;
13830 		if(!umka.vsego[i])
13831 			umka.vsego[i]=0;
13832 		if(!umka.vremya[i])
13833 			umka.vremya[i]=0;
13834 		if(!umka.kvoNaVremya[i])
13835 			umka.kvoNaVremya[i]=0;
13836 	}
13837 }
13838 
13839 function pustUmka(){
13840 	umka={
13841 		verno:[].zapslch(0,nabor.nZad,0,0,0),
13842 		vsego:[].zapslch(0,nabor.nZad,0,0,0),
13843 		vremya:[].zapslch(0,nabor.nZad,0,0,0),
13844 		kvoNaVremya:[].zapslch(0,nabor.nZad,0,0,0),
13845 	}
13846 }
13847 
13848 function sbrosUmka(a){
13849 	if(confirm('Вы действительно хотите сбросить статистику? Это действие нельзя отменить.')){
13850 		pustUmka();
13851 		sohrUmka();
13852 		if(a && a.isFunction)
13853 			a();
13854 	}
13855 }
13856 
13857 function sohrUmka(){
13858 	$.jStorage.set('umka'+nabor.name,umka);
13859 }
13860 
13861 console.log('umka.js отработал');
13862 
13863 window.vopr={};
13864 
13865 window.vopr.vrn_ist=function(kand){
13866 	for(var i2=0;i2<this.ver.length;i2++){
13867 		this.ver[i2]=this.ver[i2].istDataToStd();
13868 		if(this.ver[i2]==kand.istDataToStd())
13869 			return 1;
13870 	}
13871 	return 0;
13872 };
13873 
13874 window.vopr.vrn_mat=function(kand){
13875 	for(var i2=0;i2<this.ver.length;i2++)
13876 		if(this.ver[i2].ts()==kand.ts())
13877 			return 1;
13878 	return 0;
13879 };
13880 
13881 window.vopr.podg=function(){
13882 	window.vopr.dey=function(){};
13883 	window.vopr.ver=[];
13884 	window.vopr.nev=[];
13885 	window.vopr.txt='';
13886 	window.vopr.rsh='';
13887 	window.vopr.kat=[];
13888 	window.vopr.dgn=1;
13889 	window.vopr.err=0;
13890 	window.vopr.vrn=window.vopr.vrn_mat;
13891 }
13892 window.vopr.podg();
13893 
13894 window.vopr.trd=function(){'use strict';
13895 	try{
13896 		window.vopr.dey();
13897 	}catch(e){}
13898 }
13899 
13900 function AtoB(n){
13901 //n - количество неверных ответов
13902 	n=n?n:3;
13903 	if(window.vopr.nev.hasDubl()){
13904 		window.vopr.nev=window.vopr.nev.sortDelDubl();
13905 		console.log('AtoB(): nev: повторяющиеся варианты;');
13906 	}
13907 	if(window.vopr.ver.hasDubl()){
13908 		window.vopr.ver=window.vopr.ver.sortDelDubl();
13909 		console.log('AtoB(): ver: повторяющиеся варианты;');
13910 	}
13911 	if(vopr.dgn && dvig.dgn && dvig.validateVopr()){
13912 		vopr.err=1;
13913 		return;
13914 	}
13915 	var nev=window.vopr.nev.iz(n);
13916 	var ver=window.vopr.ver.iz();
13917 	var a=[[ver].concat(nev),[].N(n+1)].T().shuffle().T();
13918 	window.vopr.ver=[a[1].pervSovp(1)+1];
13919 	window.vopr.nev=[];
13920 	for(var i=0;i<=n;i++){
13921 		window.vopr.txt+='<br/>'+(i+1)+') '+a[0][i];
13922 	}
13923 }
13924 console.log('core_vopr.js отработал');
13925 
13926 function readNabor(str){
13927 //Строка вида favorgems.ru/sh/sluch.html#nabor&nZad=14&adres=..zdn/mat/
13928 	var a=str.split('#nabor')[1];
13929 	strNabor='##nabor'+a;
13930 	if(a==undefined)
13931 		return;
13932 	var b=a.split('&');
13933 	b.splice(0,1);//Первый элемент - пустой
13934 	b.map(function(p1){
13935 		var c=p1.split('=');
13936 		nabor[c[0]]=c[1];
13937 	});
13938 }
13939 
13940 var strNabor='';
13941 var nabor={}; // Глобальная переменная, отвечающая за выбор предмета
13942 nabor.nZad=15;
13943 nabor.adres='../zdn/mat2014/';
13944 nabor.prefix='B';
13945 nabor.name='ege2014';
13946 nabor.zagol='';
13947 nabor.mnogostrOtvet=0;
13948 nabor.kat={
13949 	prz:'Без производной'		,
13950 	log:'Без логарифмов'		,
13951 	tri:'Без тригонометрии'		,
13952 	drs:'Без дробных степеней'	,
13953 };
13954 
13955 nabor.vykl=[];
13956 nabor.altz=[];
13957 
13958 readNabor(document.location.href);
13959 
13960 console.log('core_nabor.js отработал');
13961 //{{Движок
13962 var dvig={};
13963 dvig.ping=svinta?100:500;
13964 dvig.startxt='1';
13965 dvig.flObn=0;
13966 dvig.dgn=1;
13967 
13968 dvig.validateVopr=function(){
13969 	var rez='';
13970 	for(var pole in vopr){
13971 		var t=hasErrors(vopr[pole],vopr.kat.bdr);
13972 		if(t)
13973 			rez+=pole+" : "+t+'; ';
13974 	}
13975 	if(vopr.nev.hasElemStrict(''))
13976 		rez+='nev: пустой вариант; ';
13977 	if(vopr.ver.hasElemStrict(''))
13978 		rez+='ver: пустой вариант; ';
13979 	if(vopr.nev.hasDubl())
13980 		rez+='nev: повторяющиеся варианты; ';
13981 	var masOtv=vopr.ver.sortDelDubl().concat(vopr.nev.sortDelDubl());
13982 	if(masOtv.hasDubl())
13983 		rez+='варианты ответа, верные и не верные одновременно; ';
13984 	
13985 	return rez;
13986 }
13987 
13988 dvig.obnov=function(cb,kat,nom){'use strict';//cb - функция, вызываемая, когда вопрос успешно обновился
13989 	if(dvig.flObn)
13990 		return;
13991 	if((window.vopr.txt!=0)&&(dvig.startxt!=window.vopr.txt)){
13992 		dvig.startxt=window.vopr.txt;
13993 		clearInterval(dvig.intervZapros);
13994 		clearInterval(dvig.intervZadan);
13995 		if(!sootvKat() || vopr.err){
13996 			dvig.zadan(cb,kat);
13997 			return;
13998 		}
13999 		var t=dvig.validateVopr();
14000 		if(t){
14001 			console.log(t+'\n\r');
14002 			if(vopr.dgn && dvig.dgn){
14003 				dvig.zadan(cb,kat);
14004 				return;
14005 			}
14006 		}
14007 		dvig.flObn=1;
14008 		cb(window.vopr.clone());
14009 	}else
14010 		setTimeout('dvig.obnov('+cb+','+kat+','+nom+');',100);
14011 }
14012 
14013 dvig.zapros=function(cb,kat,nom){'use strict';
14014 	if(dvig.flObn)
14015 		return;
14016 	if(kat === undefined)
14017 		kat=kategory;
14018 	if(nom === undefined)
14019 		nom=nomer;
14020 	window.vopr.dop.nomer=nom;
14021 	try{
14022 		console.log('Составляется задание '+nom+' категории '+kat);
14023 		nabor.upak[dvig.getzadname(kat)][nom]();
14024 		setTimeout('dvig.obnov('+cb+','+kat+','+nom+');',0);
14025 	}catch(e){
14026 		zagr(nabor.adres+dvig.getzadname(kat)+'/'+nomer+'.js');
14027 		setTimeout('dvig.obnov('+cb+','+kat+','+nom+');',dvig.ping);
14028 	clearInterval(dvig.intervZapros);
14029 	dvig.intervZapros=setTimeout('dvig.zapros('+cb+','+kat+','+nomer+');',dvig.ping*4);
14030 	}
14031 }
14032 
14033 dvig.zadan=function(cb,kat,nom,ekz){'use strict';
14034 	dvig.flObn=0;
14035 	dvig.startxt=window.vopr.txt;
14036 	window.vopr.podg();
14037 	window.vopr.dop={prefix:nabor.prefix,kategory:kat,nomer:nom,ekz:ekz,};
14038 	if(nom !== undefined)
14039 		return dvig.zapros(cb,kat,nom);
14040 	try{
14041 		nabor.upak[dvig.getzadname(kat)].main();
14042 		dvig.zapros(cb,kat,nomer);
14043 	}catch(e){
14044 		zagr(nabor.adres+dvig.getzadname(kat)+'/main.js');
14045 		setTimeout('dvig.zapros('+cb+','+kat+','+nomer+');',dvig.ping);
14046 	clearInterval(dvig.intervZadan);
14047 	dvig.intervZadan=setTimeout('dvig.zadan('+cb+','+kat+');',dvig.ping*8)
14048 	}
14049 }
14050 
14051 dvig.getzadname=function(kat){
14052 	return nabor.altz[kat]?nabor.altz[kat]:nabor.prefix+kat;
14053 }
14054 
14055 dvig.variativeABC=function(){
14056 	var alph='ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');
14057 	var alph2=alph.slice().shuffle();
14058 	vopr=mapRecursive(vopr,function(str){
14059 		return (''+str).cepZamena(alph,alph2);
14060 	});
14061 }
14062 //}}Движок
14063 
14064 console.log('core_dvig.js отработал');
14065 //Движок от В14
14066 
14067 //a - объект с параметрами. Так сказать, питонический подход.
14068 //slag - массив со слагаемыми в виде строк. Наверное, можно и числа, но лучше не надо.
14069 //minx - точка минимума					//Если одно из них не указано, попросту не спрашиваем
14070 //miny - значение в точке минимума		//
14071 //maxx - точка максимума				//
14072 //maxy - значение в точке максимума		//
14073 //cnst - принудительно указать константу. Если 0 - то ясно, не упоминать.
14074 //prnz - начало промежутка				//
14075 //prkz - конец промежутка				//Если одного нет, то луч. Если обоих, то вся ОДЗ
14076 //prnb - открытое начало промежутка				
14077 //prkb - открытый конец промежутка				
14078 //chet - чётная функция
14079 //nech - нечётная функция
14080 
14081 function fn_promezh(a){
14082 	if(a.prnz)
14083 		a.prnz=a.prnz.ts().plusminus();
14084 	if(a.prkz)
14085 		a.prkz=a.prkz.ts().plusminus();
14086 	//Если границ промежутка нет, то это числовая прямая.
14087 	if(a.prnz==undefined && a.prkz==undefined)
14088 		return {
14089 			nazv:'',
14090 			text:'$(-\\infty;\\infty)$',
14091 		}
14092 	
14093 	if(a.prnz==undefined && a.prkb)
14094 		return{
14095 			nazv:'открытый луч',
14096 			text:'$(-\\infty;'+a.prkz.ts()+')$',
14097 		}
14098 	
14099 	if(a.prkz==undefined && a.prnb)
14100 		return{
14101 			nazv:'открытый луч',
14102 			text:'$('+a.prnz.ts()+';\\infty)$',
14103 		}
14104 	
14105 	if(a.prnz==undefined)
14106 		return{
14107 			nazv:'луч',
14108 			text:'$(-\\infty;'+a.prkz.ts()+']$',
14109 		}
14110 	
14111 	if(a.prkz==undefined)
14112 		return{
14113 			nazv:'луч',
14114 			text:'$['+a.prnz.ts()+';\\infty)$',
14115 		}
14116 
14117 	//Ага, обе границы есть
14118 	
14119 	if(a.prkb&&a.prnb)
14120 		return{
14121 			nazv:'интервал',
14122 			text:'$('+a.prnz.ts()+';'+a.prkz.ts()+')$',
14123 		}
14124 	
14125 	if(a.prkb)
14126 		return{
14127 			nazv:'полуинтервал',
14128 			text:'$['+a.prnz.ts()+';'+a.prkz.ts()+')$',
14129 		}
14130 	
14131 	if(a.prnb)
14132 		return{
14133 			nazv:'полуинтервал',
14134 			text:'$('+a.prnz.ts()+';'+a.prkz.ts()+']$',
14135 		}
14136 	
14137 	return{
14138 		nazv:'отрезок',
14139 		text:'$['+a.prnz.ts()+';'+a.prkz.ts()+']$',
14140 	}
14141 }
14142 
14143 function fn_na(a){
14144 	var b=fn_promezh(a);
14145 	if(!b.nazv)
14146 		return '';
14147 	return ' на '+lx[b.nazv].pe+' '+b.text;
14148 }
14149 
14150 function fn_formul(a){
14151 	var txt=[];
14152 	var otv=[];
14153 	if(a.minx!=undefined){
14154 		txt.push('точка минимума');
14155 		otv.push(a.minx);
14156 	}
14157 	if(a.maxx!=undefined){
14158 		txt.push('точка максимума');
14159 		otv.push(a.maxx);
14160 	}
14161 	if(a.miny!=undefined){
14162 		txt.push('наименьшее значение');
14163 		otv.push(a.miny);
14164 	}
14165 	if(a.maxy!=undefined){
14166 		txt.push('наибольшее значение');
14167 		otv.push(a.maxy);
14168 	}
14169 	var vpr=[txt,otv].T().iz();
14170 	return {
14171 		txt: (om.otvnaydite.iz().toZagl()+' '+lx[vpr[0]].ve+
14172 			' функции $y = '+a.slag.slag()+'$'+fn_na(a)).plusminus(),
14173 		ver: vpr[1].plusminus(),
14174 	}
14175 }
14176 
14177 function fn_maxminxObmen(a){
14178 	//Меняем местами минимум и максимум
14179 	var buf=a.minx;
14180 	a.minx=a.maxx;
14181 	a.maxx=buf;
14182 }
14183 
14184 function fn_maxminxMinus(a){
14185 	a.maxx=fn_minus(a.maxx);
14186 	a.minx=fn_minus(a.minx);
14187 }
14188 
14189 function fn_promezhMinus(a){
14190 	//Меняем местами границы интервала и дописываем минус
14191 	var buf=a.prnz;
14192 	a.prnz=fn_minus(a.prkz);
14193 	a.prkz=fn_minus(buf);
14194 
14195 	buf=a.prnb;
14196 	a.prnb=a.prkb;
14197 	a.prkb=buf;
14198 }
14199 
14200 function fn_maxminyMinusObmen(a){
14201 	//Меняем местами наибольшее и наименьшее значения
14202 	var buf=a.miny;
14203 	a.miny=fn_minus(a.maxy);
14204 	a.maxy=fn_minus(buf);
14205 }
14206 
14207 function fn_minus(b){
14208 	if(b)
14209 		return '-'+b.ts();
14210 	return b;
14211 }
14212 
14213 function fn_plusminus(a){
14214 	if(sl1()){
14215 		//Меняем местами минимум и максимум
14216 		fn_maxminxObmen(a);
14217 		//Меняем местами наибольшее и наименьшее значения
14218 		fn_maxminyMinusObmen(a);
14219 		a.slag=a.slag.addPrefix('-');
14220 	}
14221 }
14222 
14223 function fn_const(a){
14224 	if( (a.cnst!=0) && (!a.maxy||a.maxy.isNumber) && (!a.miny||a.miny.isNumber) )	{
14225 		if(a.cnst==undefined)
14226 			a.cnst=sl(-99,99);
14227 		if(a.cnst.isNumber){
14228 			a.slag.push(a.cnst);
14229 			if(a.maxy!=undefined)
14230 				a.maxy+=a.cnst;
14231 			if(a.miny!=undefined)
14232 				a.miny+=a.cnst;
14233 		}
14234 	}
14235 }
14236 
14237 function fn_chet(a){
14238 	if(sl1()){
14239 		fn_maxminxMinus(a);
14240 		fn_promezhMinus(a);
14241 	}
14242 }
14243 
14244 function fn_nech(a){
14245 	if(sl1()){
14246 		fn_maxminxObmen(a);
14247 		fn_maxminxMinus(a);
14248 		fn_promezhMinus(a);
14249 		fn_maxminyMinusObmen(a);
14250 	}
14251 }
14252 
14253 function fn_zadan(a){
14254 	a.NaNtoUndefined();
14255 	if(a.nech)
14256 		fn_nech(a);
14257 	else if(a.chet)
14258 		fn_chet(a);
14259 	fn_const(a);
14260 	fn_plusminus(a);
14261 	return fn_formul(a);
14262 }
14263 
14264 //А это - неудачная, тупиковая ветка, но она таки используется
14265 
14266 function fn_txt(nai,f,n,k,nb,kb){
14267 	return (
14268 		om.otvnaydite.iz().toZagl()+' '+nai+' функции $y = '+f+'$ на промежутке $'+(nb?'(':'[')+n+';'+k+(kb?')':']')+'$.'
14269 	).plusminus();
14270 }	
14271 
14272 //Блок из функций, которые обеспечивают движок расчётных задач
14273 //{{
14274 
14275 function svVel(a){
14276 /*Массив a состоит из элементов-объектов следующей структуры:
14277 	vel: название величины
14278 	rod: род существительного
14279 		0: мужской
14280 		1: женский
14281 		2: средний
14282 		3: только во множественном числе
14283 	bkv: буква, которой обозначается величина. Если её нет, не упоминается.
14284 	zna: значение величины
14285 	nmn: размерность величины. Опять же, если не указано - лесом.
14286 	nah: можно ли требовать найти величину
14287 	pre: префикс, то есть то, что пишется перед названием величины
14288 	utv: альтернативное величине утвердительное высказывание
14289 	vpr: альтернативный вопрос
14290 	vin: величина в винительном падеже. Если равна 1, то именительный и винительный падежи совпадают. Если не определена, то конструкции, где нужен в. п., избегаются.
14291 */
14292 	var b=a.slice();
14293 	b.shuffle();
14294 	for(;!b[0].nah;b.shuffle()){};
14295 	var rez='';//Сюда будет записан результат
14296 	var c=b[0];
14297 	for(var i1=b.length-1;i1>0;i1--)
14298 		b[i1]=nazvVel(b[i1]);
14299 	
14300 	b.splice(0,1);
14301 	var d=sluchch(1,[b.length,3].minE());
14302 	var f=[c.zna];//В этом массиве будут фразы.
14303 	f[1]=voprVel(c,sosiskaVel(b.splice(0,d)));
14304 	for(;b.length;){
14305 		var st=b.splice(0,1);
14306 		var sk=sosiskaVel(b.splice(0,sluchch(2)));
14307 		f.push((om.utochn.iz()+st+(sk?om.utochn2.iz()+sk:'')+'. ').plusminus().toZagl());
14308 	}
14309 	return f;
14310 }
14311 
14312 function nazvVel(a){
14313 	if(a.utv)
14314 		return a.utv;
14315 	if(!a.rod)
14316 		a.rod=0;
14317 	
14318 	var rez=(
14319 		a.vel+' '+
14320 		(a.bkv?
14321 			'$'+a.bkv+'=':
14322 			[om.ravno,om.sostavl].iz()[a.rod]+' '
14323 		)+
14324 		(a.pre?
14325 			a.pre:
14326 			''
14327 		)+
14328 		a.zna+
14329 		(a.nmn?
14330 			(a.bkv?
14331 			'~':
14332 			' '
14333 			)
14334 			+a.nmn:
14335 			''
14336 		)+
14337 		(a.bkv?
14338 			'$':
14339 			''
14340 		)
14341 	);
14342 //	console.log(rez);
14343 	return rez;
14344 }
14345 
14346 function sosiskaVel(a){
14347 	if(!a.length)
14348 		return '';
14349 
14350 	for(var rez=''+a.splice(0,1);a.length;)
14351 		rez+=om.utochn2.iz()+a.splice(0,1);
14352 
14353 	return rez;
14354 }
14355 
14356 function voprVel(a,t1){
14357 	var rez='';
14358 	t1=t1.trim();
14359 	t1=t1?', если '+t1:'';
14360 	a.rod=a.rod?a.rod:0;
14361 	if(a.vpr){
14362 		rez=a.vpr.toZagl()+t1+'? '+
14363 		(
14364 		!!a.nmn?
14365 		['ответ',otvdayte.iz()].shuffle().join(' ').toZagl()+' в '+a.nmn+'.':
14366 		''		
14367 		);
14368 		return rez;
14369 	}
14370 	var bkv=(' $'+a.bkv+'$').esli(a.bkv);
14371 	var rez=[
14372 			'Чему '+om.ravno[a.rod]+' '+a.vel+bkv+t1+'? '+
14373 			(
14374 				a.nmn?
14375 				'Ответ выразите в '+a.nmn+'.'.esli(a.nmn.posl()!='.')+' ':
14376 				''
14377 			)
14378 		,
14379 			'Чему '+om.ravno[a.rod]+' '+a.vel+bkv+
14380 			(
14381 				a.nmn?
14382 				', '+lx['выраженный'].i[a.rod]+' в '+a.nmn:
14383 				''
14384 			)+
14385 			t1+'? '
14386 		,
14387 			'Сколько '+(a.nmn+' ').esli(a.nmn)+om.sostavl[a.rod]+' '+a.vel+bkv+t1+'? '
14388 		,
14389 	];
14390 	if(a.vin==1)
14391 		a.vin=a.vel;
14392 	
14393 	if(a.vin){
14394 		rez.push(
14395 			om.otvnaydite.iz().toZagl()+' '+a.vin+bkv+
14396 			(
14397 				a.nmn?
14398 				', '+lx['выраженный'].v[a.rod]+'в '+a.nmn:
14399 				''
14400 			)
14401 			+t1+'. '
14402 		);
14403 		rez.push(
14404 			om.otvnaydite.iz().toZagl()+' '+a.vin+bkv+t1+'. '+
14405 			(
14406 				a.nmn?
14407 				'Ответ выразите в '+a.nmn+'. ':
14408 				''
14409 			)
14410 		);
14411 	}
14412 	return rez.iz();
14413 }
14414 
14415 //}}
14416 
14417 function lz_main(string){
14418 	var vars=[];
14419 	
14420 }
14421 
14422 function lz_split(string){
14423 	if(!string)
14424 		return [[]];
14425 	var mas=string.reverse().split(/\s(?=[?!.,:;-])/).reverse().reverseElems();
14426 	var len=mas.length;
14427 	if(mas[len-1]==''){
14428 		mas.length--;
14429 		len--;
14430 	}
14431 	var temp;
14432 	for(var i=0;i<len;){
14433 		if(mas[i]==''){
14434 			mas.splice(i,1);
14435 			len--;
14436 			continue;
14437 		}
14438 		temp=mas[i].match(/[?!.,:;-]+$/)[0];
14439 		mas[i]=mas[i].replace(/[?!.,:;-]/g,'').split(/\s/);
14440 		mas[i].push(temp);
14441 		i++;
14442 	}
14443 	return mas.matrToVect();
14444 }
14445 
14446 var nastr={};//Глобальный объект с настройками
14447 nastr.nabor=nabor;
14448 
14449 try{
14450 	var decodedJSON=document.location.hash.decodeURIComponent();
14451 	document.location.hash=decodedJSON;
14452 	var parsedJSON=JSON.parse(decodedJSON.substr(1));
14453 	
14454 	if(parsedJSON.isString)
14455 		nastr.previousHash='#'+parsedJSON;
14456 	else{
14457 		nastr.nabor.importFrom(parsedJSON.nabor);
14458 	}
14459 }catch(e){
14460 	console.log('Не удалось выделить настройки из адреса страницы.');
14461 }
14462 
14463 var previousHeight=-1;
14464 var previousWidth=-1;
14465 
14466 function podgonIframeHeight(){
14467 	if(window.parsedJSON.iframe){
14468 		var h=getDocHeight();
14469 		if(h!=previousHeight){
14470 			previousHeight=h;
14471 			var ifrh=[];
14472 			ifrh[parsedJSON.iframe.nomer]=h;
14473 			parent.postMessage(
14474 			{
14475 				chasMessage:{
14476 					iframeHeight:ifrh,
14477 				},
14478 			}
14479 			,'*');
14480 		}
14481 	}
14482 }
14483 
14484 function parseMessageInIframe(mes){
14485 	if(!mes.data.chasMessage)
14486 		return;
14487 	var ifr=mes.data.chasMessage.iframeWidth;
14488 	if(ifr<900 && ifr!=previousWidth && !self.location.href.match(/mini\.html/)){
14489 		document.body.style.zoom=ifr/900;
14490 		previousWidth=ifr;
14491 		console.log(ifr);
14492 	}
14493 }
14494 
14495 try{
14496 	if(window!=top){
14497 		$(setInterval(podgonIframeHeight,256));
14498 		window.addEventListener("message",parseMessageInIframe,false);
14499 	}
14500 }catch(e){}
14501 
14502 addscript(nabor.adres+'upak.js');
14503 if(nabor.zagol)
14504 	addscript(nabor.zagol,'$(function(){zagr(nabor.adres+\'upak.js\')});');
14505 
14506 window.latbukv=["A","B","C","D","F","G","H","J","L","M","N","P","R","S","T","Q","U","W","X","Y","Z"];
14507 window.rusbukv=["А","Б","В","Г","Д","Е","Ё","Ж","И","Й","К","Л","М","Н","П","Р","С","Т","У","Ф","Х","Ц","Ч","Ш","Щ","Ъ","Ы","Ь","Э","Ю","Я"];
14508 
14509 window.moneta=['орёл','решка'];
14510 
14511 window.razy=['ни разу','один раз','дважды','трижды','четырежды','пятикратно','шестикратно','семикратно','восьмикратно','девятикратно','десятикратно'];
14512 
14513 window.kachestva={};
14514 window.kachestva.ie=['безопасность','комфорт','функциональность','качество','внешний вид','простота ремонта','надёжность','гарантийный срок','скорость запуска','настраиваемость'];
14515 
14516 window.tovary={};
14517 window.tovary.ie=['автомобиль'	,'кофеварка'	,'чайник'	,'ноутбук'		,'бензопила'	,'СВЧ-печь'		,'велосипед'	,'садовый насос'	];
14518 window.tovary.rm=['автомобилей'	,'кофеварок'	,'чайников'	,'ноутбуков'	,'бензопил'		,'СВЧ-печей'	,'велосипедов'	,'садовых насосов'	];
14519 
14520 window.dlina={};
14521 window.dlina.m= [/*7467.6, 			*/	1066.8,		185.2,			1852,				1609.34,				201.16		];
14522 window.dlina.pm=[/*'русских милях',	*/	'вёрстах',	'кабельтовах',	'морских милях',	'американских милях',	'фурлонгах'	];
14523 window.dlina.ie=[/*'русская миля',	*/	'верста',	'кабельтов',	'морская миля',		'американская миля',	'фурлонг'	];
14524 window.dlina.rm=[/*'русских миль',	*/	'вёрст',	'кабельтовых',	'морских миль',		'американских миль',	'фурлонгов'	];
14525 
14526 window.imenaj={};
14527 window.imenaj.ie=['Анастасия','Юлия','Елена','Ольга','Яна','Олеся','Кристина','Вероника','Элеонора','Дарья','Мария','Екатерина','Софья','Наталия','Надежда','Александра'];
14528 
14529 window.otchestvaj={};
14530 window.otchestvaj.ie=['','Ивановна','Петровна','Фёдоровна','Васильевна','Анатольевна','Николаевна','Сергеевна','Игоревна','Михайловна','Владимировна','Олеговна','Степановна','Юрьевна','Александровна','Алексеевна','','','','']
14531 
14532 window.profesj={};
14533 window.profesj.ie=['суровая воронежская хакерша','','программистка','веб-дизайнер','аспирантка','скромный библиотекарь','блондинка','студентка','школьница','комсомолка, спортсменка, отличница и, наконец, просто красавица','']
14534 
14535 window.deistviaj=['купила','получила в наследство','получила в подарок','нашла','приобрела','раздобыла'];
14536 
14537 window.transportm={};
14538 window.transportm.ie=['"Запорожец"'	,'"Москвич"'	/*,'автомобиль'*/	,'грузовик'	,'велосипед'	,'доисторический омнибус','автобус'];
14539 window.transportm.r2=['"Запорожца"'	,'"Москвича"'	/*,'автомобиля'*/	,'грузовика','велосипеда'	,'доисторических омнибуса','автобуса'];
14540 window.transportm.re=['"Запорожца"'	,'"Москвича"'	/*,'автомобиля'*/	,'грузовика','велосипеда'	,'доисторического омнибуса','автобуса'];
14541 window.transportm.te=['"Запорожцем"','"Москвичом"'	/*,'автомобилем'*/	,'грузовиком','велосипедом','доисторическим омнибусом','автобусом'];
14542 
14543 window.pifagtr=[[3,4,5],[5,12,13],[8,15,17],[7,24,25]];
14544 
14545 window.mesiacy={};
14546 window.mesiacy.re=['января','февраля','марта','апреля','мая','июня','июля','августа','сентября','октября','ноября','декабря'];
14547 window.mesiacy.dni=[31,28,31,30,31,30,31,31,30,31,30,31];
14548 
14549 window.valuta={};
14550 window.valuta.re=['доллара','евро','фунта стерлингов'];
14551 
14552 var om={};
14553 om.eda={};
14554 om.eda.ie=['сырок'	,'шоколадка'	,'яблоко'	,'груша'	,'упаковка сока'	,'бутерброд'	,'бутылка газировки'	,'батон'	,'буханка хлеба'	];
14555 om.eda.re=['сырка'	,'шоколадки'	,'яблока'	,'груши'	,'упаковки сока'	,'бутерброда'	,'бутылки газировки'	,'батона'	,'буханки хлеба'	];
14556 om.eda.ve=['сырок'	,'шоколадку'	,'яблоко'	,'грушу'	,'упаковку сока'	,'бутерброд'	,'бутылку газировки'	,'батон'	,'буханку хлеба'	];
14557 om.eda.rm=['сырков'	,'шоколадок'	,'яблок'	,'груш'		,'упаковок сока'	,'бутербродов'	,'бутылок газировки'	,'батонов'	,'буханок хлеба'	];
14558 
14559 om.korabli={};
14560 om.korabli.ie=['корабль'	,'круизный лайнер'	,'прогулочное судно'	,'теплоход'		,'пароход'	,'атомоход'		];
14561 om.korabli.pe=['корабле'	,'круизном лайнере'	,'прогулочном судне'	,'теплоходе'	,'пароходе'	,'атомоходе'	];
14562 
14563 om.meltov={};
14564 om.meltov.ie=['фонарик'		,'флакон шампуня'	,'флэшка'	,'компакт-диск'		,'сувенир'		,'матрёшка'	,'магнит на холодильник'	,'сборник тестов для подготовки к ЕГЭ'		,'тетрадь'	,'учебник'		,'цветочный горшок'		];
14565 om.meltov.im=['фонарики'	,'флаконы шампуня'	,'флэшки'	,'компакт-диски'	,'сувениры'		,'матрёшки'	,'магниты на холодильник'	,'сборники тестов для подготовки к ЕГЭ'		,'тетради'	,'учебники'		,'цветочные горшки'		];
14566 om.meltov.re=['фонарика'	,'флакона шампуня'	,'флэшки'	,'компакт-диска'	,'сувенира'		,'матрёшки'	,'магнита на холодильник'	,'сборника тестов для подготовки к ЕГЭ'		,'тетради'	,'учебника'		,'цветочных горшка'		];
14567 om.meltov.ve=['фонарик'		,'флакон шампуня'	,'флэшку'	,'компакт-диск'		,'сувенир'		,'матрёшку'	,'магнит на холодильник'	,'сборник тестов для подготовки к ЕГЭ'		,'тетрадь'	,'учебник'		,'цветочный горшок'		];
14568 om.meltov.rm=['фонариков'	,'флаконов шампуня'	,'флэшек'	,'компакт-дисков'	,'сувениров'	,'матрёшек'	,'магнитов на холодильник'	,'сборников тестов для подготовки к ЕГЭ'	,'тетрадей'	,'учебников'	,'цветочных горшков'	];
14569 
14570 om.sroki={};
14571 om.sroki.re=['недели'	,'декады'	,'месяца'	];
14572 om.sroki.ve=['неделю'	,'декаду'	,'месяц'	];
14573 om.sroki.rm=['недель'	,'декад'	,'месяцев'	];
14574 
14575 om.uchrezhd={};
14576 om.uchrezhd.ie=['офис'	,'канцелярия'	,'секретариат'	,'министерство'	,'ведомство'	,'Рособрнадзор'	,'Минобрнауки'	];
14577 om.uchrezhd.ve=['офис'	,'канцелярию'	,'секретариат'	,'министерство'	,'ведомство'	,'Рособрнадзор'	,'Минобрнауки'	];
14578 om.uchrezhd.pe=['офисе'	,'канцелярии'	,'секретариате'	,'министерстве'	,'ведомстве'	,'Рособрнадзоре','Минобрнауки'	];
14579 
14580 om.denned={};
14581 om.denned.ie=		['воскресенье'	,'понедельник'	,'вторник'	,'среда'	,'четверг'	,'пятница'	,'суббота'	];
14582 om.denned.ve=		['воскресенье'	,'понедельник'	,'вторник'	,'среду'	,'четверг'	,'пятницу'	,'субботу'	];
14583 om.denned.pg=[];
14584 om.denned.pg['в']=	['в'			,'в'			,'во'		,'в'		,'в'		,'в'		,'в'		];
14585 
14586 om.igrkosti=[];
14587 om.igrkosti[2]=[0,0,1,2,3,4,5,6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
14588 om.igrkosti[3]=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
14589 (function() {
14590 	for(var i1=1;i1<=6;i1++)
14591 		for(var i2=1;i2<=6;i2++)
14592 			for(var i3=1;i3<=6;i3++)
14593 				om.igrkosti[3][i1+i2+i3]++;
14594 })();
14595 
14596 om.strany={};
14597 om.strany.ie=['Россия'	,'Белоруссия'	,'Китай'	,'ЮАР'	,'Эквадор'	,'Венесуэла'	,'Куба'	,'Австралия'	,'Австрия'	,'Бельгия'	,'Англия'	,'Германия'	,'Польша'	,'Сербия'	,'Чехия'	,'Словакия'	,'Словения'	,'Израиль'	,'Бразилия'	,'Мексика'	];
14598 om.strany.re=['России'	,'Белоруссии'	,'Китая'	,'ЮАР'	,'Эквадора'	,'Венесуэлы'	,'Кубы'	,'Австралии'	,'Австрии'	,'Бельгии'	,'Англии'	,'Германии'	,'Польши'	,'Сербии'	,'Чехии'	,'Словакии'	,'Словении'	,'Израиля'	,'Бразилии'	,'Мексики'	];
14599 
14600 om.sportparn={};
14601 om.sportparn.ie=['шахматы'	,'вольная борьба'	,'настольный теннис'	,'бадминтон'	,'шашки'	];
14602 om.sportparn.pe=['шахматам'	,'вольной борьбе'	,'настольному теннису'	,'бадминтону'	,'шашкам'	];
14603 
14604 
14605 om.sport={};
14606 om.sport.ie=['гимнастика'	,'вольная борьба'	,'лёгкая атлетика'	,'тяжёлая атлетика'	];
14607 om.sport.pe=['гимнастике'	,'вольной борьбе'	,'лёгкой атлетике'	,'тяжёлой атлетике'	];
14608 
14609 om.izdsteklo={};
14610 om.izdsteklo.rm=['витрин','оконных рам','аквариумов','книжных полок','террариумов'];
14611 
14612 om.znamenat=[2,4,5,8,10,20,25,100,200];
14613 
14614 om.zhidkost={};
14615 om.zhidkost.re=['воды','ртути','жидкости','раствора','бензина','керосина','метилового спирта','газировки','уксуса','нефти'];
14616 
14617 om.ravno=['равен','равна','равно','равны'];
14618 om.sostavl=['составляет','составляет','составляет','составляют'];
14619 om.vyrazh=['выраженный','выраженная','выраженное','выраженные'];
14620 om.utochn=['','','','','','при этом ','известно, что '];
14621 om.utochn2=[', при этом ',', а ',', '];
14622 
14623 om.goroda=['Воронеж','Москва','Санкт-Петербург','Казань','Сочи','Семилуки','Хабаровск','Магадан','Красноярск'];
14624 
14625 om.porchisl={};
14626 om.porchisl[1]={};
14627 om.porchisl[1].i=['первый','первая','первое','первые'];
14628 om.porchisl[2]={};
14629 om.porchisl[2].i=['второй','вторая','второе','вторые'];
14630 om.porchisl[3]={};
14631 om.porchisl[3].i=['третий','третья','третье','третьи'];
14632 om.porchisl[4]={};
14633 om.porchisl[4].i=['четвёртый','четвёртая','четвёртое','четвёртые'];
14634 om.porchisl[5]={};
14635 om.porchisl[5].i=['пятый','пятая','пятое','пятые'];
14636 om.porchisl[6]={};
14637 om.porchisl[6].i=['шестой','шестая','шестое','шестые'];
14638 om.porchisl[7]={};
14639 om.porchisl[7].i=['седьмой','седьмая','седьмое','седьмые'];
14640 om.porchisl[8]={};
14641 om.porchisl[8].i=['восьмой','восьмая','восьмое','восьмые'];
14642 om.porchisl[9]={};
14643 om.porchisl[9].i=['девятый','девятая','девятое','девятые'];
14644 om.porchisl[10]={};
14645 om.porchisl[10].i=['деcятый','деcятая','деcятое','деcятые'];
14646 om.porchisl[11]={};
14647 om.porchisl[11].i=['одиннадцатый','одиннадцатая','одиннадцатое','одиннадцатые'];
14648 om.porchisl[12]={};
14649 om.porchisl[12].i=['двенадцатый','двенадцатая','двенадцатое','двенадцатые'];
14650 om.porchisl[13]={};
14651 om.porchisl[13].i=['тринадцатый','тринадцатая','тринадцатое','тринадцатые'];
14652 om.porchisl[14]={};
14653 om.porchisl[14].i=['четырнадцатый','четырнадцатая','четырнадцатое','четырнадцатые'];
14654 om.porchisl[15]={};
14655 om.porchisl[15].i=['пятнадцатый','пятнадцатая','пятнадцатое','пятнадцатые'];
14656 om.porchisl[16]={};
14657 om.porchisl[16].i=['шестнадцатый','шестнадцатая','шестнадцатое','шестнадцатые'];
14658 om.porchisl[17]={};
14659 om.porchisl[17].i=['семнадцатый','семнадцатая','семнадцатое','семнадцатые'];
14660 om.porchisl[18]={};
14661 om.porchisl[18].i=['восемнадцатый','восемнадцатая','восемнадцатое','восемнадцатые'];
14662 om.porchisl[19]={};
14663 om.porchisl[19].i=['девятнадцатый','девятнадцатая','девятнадцатое','девятнадцатые'];
14664 om.porchisl[20]={};
14665 om.porchisl[20].i=['двадцатый','двадцатая','двадцатое','двадцатые'];
14666 
14667 om.otvdayte=['выразите','дайте','приведите','запишите'];
14668 om.otvnaydite=['найдите','определите','вычислите'];
14669 
14670 om.metally={};
14671 om.metally.re=['меди','алюминия','чугуна','железа','стали','никеля','хрома'];
14672 
14673 
14674 om.mesiacy=window.mesiacy;
14675 om.tovary=window.tovary;
14676 om.rusbukv=window.rusbukv;
14677 om.latbukv=window.latbukv;
14678 om.imenaj=window.imenaj;
14679 om.transportm=window.transportm;
14680 om.pifagtr=window.pifagtr;
14681 
14682 om.toplivo=['топливо','бензин','дизель','газ','керосин','солярка'];
14683 om.mezhgortrans=['автобус','поезд'];
14684 om.naspunkt=['пункт','населённый пункт','город','городок','ПГТ','деревня','село','хутор','посёлок','инноград','наукоград'];
14685 om.stroymat=['пенобетон','бетон','брус','шлак','песок','щебень','гранит','известняк','песчаник','камень','гравий'];
14686 om.izmergruz=['тонна','кубометр'];
14687 om.stroenmal=['гараж','дом','дача','магазин'];
14688 
14689 om.edizm={};
14690 om.edizm.dlina=[
14691 	['метр',1],
14692 	['километр',1000],
14693 	['дециметр',0.1],
14694 	['сантиметр',0.01],
14695 	['миллиметр',0.001],
14696 ];
14697 nastr.style={fon:'white',pan:'#e9b96e',menuLinkTarget:"_self"};//Оформление по умолчанию
14698 if(egeok || (document.referrer.search(/\/\/ege-ok\.ru/)+1)){
14699 	//Если с сайта ege-ok.ru, меняем оформление
14700 	nastr.style.fon='white';
14701 	nastr.style.pan='#DED';
14702 	document.write('<style>div.egeok{display:block;}</style>');
14703 //	$('.egeok').css('display','auto');
14704 }else if(izvk || _4ege){
14705 	nastr.style.fon='#FFF';
14706 	nastr.style.pan='#DDF';
14707 }else if(document.referrer.search(/\/\/edu\.ru/)+1){
14708 	nastr.style.fon='white';
14709 	nastr.style.menuLinkTarget='_self';
14710 }
14711 
14712 try{
14713 	if(parsedJSON){
14714 		nastr.style.importFrom(parsedJSON.style);
14715 	}
14716 }catch(e){};
14717 
14718 document.write('<style>');
14719 document.write('body, .fon{');
14720 document.write('	background-color:'+nastr.style.fon+';');
14721 document.write('}');
14722 document.write('#prov_knopki, #panel, ul.pureCssMenu,ul.pureCssMenu ul, ul.pureCssMenu a, ul.pureCssMenu li.dis a:hover, ul.pureCssMenu li.sep a:hover, ul.pureCssMenu li a.pureCssMenui0{');
14723 document.write('	background-color:'+nastr.style.pan+';');
14724 document.write('}');
14725 document.write('ul.pureCssMenu li:hover>a, ul.pureCssMenu li a:hover, ul.pureCssMenu li a.pureCssMenui0:hover, ul.pureCssMenu li.dis a:hover, ul.pureCssMenu li.sep a:hover {');
14726 document.write('	background-color:'+nastr.style.fon+';');
14727 document.write('}');
14728 document.write('.anythingSlider .arrow span {');
14729 document.write('	color:'+nastr.style.pan+';');
14730 document.write('}');
14731 document.write('#inf {');
14732 document.write('	border: 2px ridge'+nastr.style.pan+';');
14733 document.write('	border-top:none;');
14734 document.write('}');
14735 document.write('#sovety{');
14736 document.write("	font:13.5px bold;");
14737 document.write("	font-family:'liberation_sans';");
14738 document.write('}');
14739 document.write('#menucenter{');
14740 document.write("	font:14px bold;");
14741 document.write("	font-family:'liberation_sans';");
14742 document.write('}');
14743 document.write('</style>');
14744 document.write('<style id="imported">');
14745 try{
14746 	document.write(''+(nastr.style.strCSS).neutralizeXSS());
14747 }catch(e){}
14748 document.write('</style>');
14749 
14750 function _getMenuModel(genJson, nastrCopy, obol) {
14751 	//Математика ЕГЭ-2013
14752 	var nastr_mat2013 = nastrCopy.clone();
14753 	nastr_mat2013.nabor = { zagol:'../zdn/mat/mat.js' };
14754 
14755 	//Математика ЕГЭ-2014
14756 	var nastr_mat2014 = nastrCopy.clone();
14757 	nastr_mat2014.nabor = { zagol:'../zdn/mat2014/mat2014.js' };
14758 
14759 	//Математика ЕГЭ-2015 профильный
14760 	var nastr_matege2015p=nastrCopy.clone();
14761 	nastr_matege2015p.nabor={zagol:'../zdn/matege2015p/matege2015p.js'};
14762 
14763 	//Тригонометрия
14764 	var nastr_tri = nastrCopy.clone();
14765 	nastr_tri.nabor = { zagol:'../zdn/tri/tri.js' };
14766 
14767 	//Русский язык ЕГЭ-2014
14768 	var nastr_rus2014 = nastrCopy.clone();
14769 	nastr_rus2014.nabor = { zagol:'../zdn/rus2014/rus2014.js' };
14770 
14771 	//Информатика ЕГЭ-2014
14772 	var nastr_inf2014 = nastrCopy.clone();
14773 	nastr_inf2014.nabor = { zagol:'../zdn/inf/inf.js' };
14774 
14775 	//История: Перегудов
14776 	var nastr_istpereg = nastrCopy.clone();
14777 	nastr_istpereg.nabor = { zagol:'../zdn/istpereg/istpereg.js' };
14778 
14779 	return {
14780 		"На главную": "../doc/index.html" + genJson(null),
14781 		"Тесты": {
14782 			"По предметам": {
14783 				"Математика: ЕГЭ-2015 (профильный, проект)": obol + genJson(nastr_matege2015p),
14784 				"Математика: ЕГЭ-2014": obol + genJson(nastr_mat2014),
14785 				"Математика: ЕГЭ-2013": obol + genJson(nastr_mat2013),
14786 				"Тригонометрия: формулы": obol + genJson(nastr_tri),
14787 				"История: даты": obol + genJson(nastr_istpereg),
14788 				"Русский язык, ЕГЭ: часть": obol + genJson(nastr_rus2014),
14789 				"Информатика, ЕГЭ: начало": obol + genJson(nastr_inf2014)
14790 			},
14791 			"Случайное задание": "../sh/sluch.html" + genJson(null),
14792 			"Каталог заданий набора": "../sh/katalog.html" + genJson(null),
14793 			"Полный тест": "../sh/polnmat.html" + genJson(null),
14794 			"Тесты на печать": "../sh/pechmat.html" + genJson(null),
14795 		},
14796 		"Прочее": {
14797 			"Разработчикам": {
14798 				"Техническое": "../doc/tech.html" + genJson(null),
14799 				"Режим отладки шаблона": "../sh/otladka.html" + genJson(null),
14800 			},
14801 			"Скачивание": {
14802 				"Системные требования": "../doc/systreb.html" + genJson(null),
14803 				"Скачать": "../doc/skachat.html" + genJson(null),
14804 				"Репозиторий на GitHub": "https://github.com/nickkolok/chas-ege",
14805 			},
14806 			"Информация": {
14807 				"Лицензии": "../doc/license.html" + genJson(null),
14808 				"Разработчики": "../doc/razrab.html" + genJson(null),
14809 				"История выпусков": "../doc/istor.html" + genJson(null),
14810 				"Концепция": "../doc/koncepc2.html" + genJson(null),
14811 				"Ссылки": "../doc/ssylki.html" + genJson(null),
14812 			},
14813 			"Опросы и голосования": "../doc/oprosy.html" + genJson(null),
14814 		},
14815 		"Мы ВКонтакте": {
14816 			"Приложение": "https://vk.com/app3634828",
14817 			"Группа": "https://vk.com/chasege",
14818 		},
14819 		"Сайт Математического факультета ВГУ": "https://www.math.vsu.ru"
14820 	};
14821 }
14822 
14823 ////
14824 //// Are you really wanna get deeper?
14825 ////
14826 
14827 if(!_4ege) {
14828 	(function() {
14829 		var nastrCopy = nastr.clone();
14830 		nastrCopy.upak = undefined;
14831 		var obol = document.location.href.match(/[a-zA-Z0-9]+\.html/)[0] + '?' + Math.random();
14832 		var target=' target="'+nastr.style.menuLinkTarget+'" ';
14833 
14834 		function genJsonerator(n) {
14835 			var options = n;
14836 			if (n == null)
14837 				options = nastrCopy;
14838 
14839 			return '#' + JSON.stringify(n).encodeURIComponent();
14840 
14841 		}
14842 
14843 		function writeMenuItem(title, href) {
14844 			document.write("<li class=\"pureCssMenui\"><a class=\"pureCssMenui0\" href=\"" + href + "\"" + target +
14845 			               ">" + title + '</a></li>');
14846 		}
14847 
14848 		function writeNodes(nodes) {
14849 			for (var title in nodes) {
14850 				if (typeof nodes[title] == typeof "")
14851 					writeMenuItem(title, nodes[title]);
14852 				else
14853 					writeMenuCategory(title, nodes[title]);
14854 			}
14855 		}
14856 
14857 		function writeMenuCategory(title, nodes) {
14858 			document.write("	<li class=\"pureCssMenui\"><a class=\"pureCssMenui\" href=\"#\"><span>" + title + "</span>");
14859 			document.write("	<!--[if gt IE 6]--></a><!--[endif]--><!--[if lte IE 6]><table><tr><td><![endif]-->");
14860 			document.write("	<ul class=\"pureCssMenum\">");
14861 
14862 			writeNodes(nodes);
14863 
14864 			document.write("	</ul>");
14865 			document.write("	<!--[if lte IE 6]></td></tr></table></a><![endif]-->");
14866 			document.write("	</li>");
14867 		}
14868 
14869 		document.write('<div id="menucenter">');
14870 		document.write('<ul class="pureCssMenu pureCssMenum">');
14871 		writeNodes(_getMenuModel(genJsonerator, nastrCopy, obol));
14872 		document.write('</ul>');
14873 		document.write('</div>');
14874 
14875 		console.log('menu.js отработал');
14876 	})();
14877 } else {
14878 	document.write('<center><a href="https://www.math.vsu.ru/chas-ege/doc/index.html" target="blank">"Час ЕГЭ"</a> разработан при <a href="https://www.math.vsu.ru/" target="blank">Математическом факультете ВГУ</a>.</center>');
14879 }
14880 
14881 try{
14882 	if(egeok){
14883 		document.referrer=document.referrer.replace('ege-ok.ru','ege_ok.referrer');
14884 	}
14885 }catch(e){}
14886 
14887 var referrer=egeok?document.referrer.replace('ege-ok.ru','ege_ok.referrer'):document.referrer;
14888 
14889 try{
14890 //$(function(){
14891 	if(!svinta){
14892 //		var ymdiv=document.createElement('div');
14893 //		ymdiv.style.top='-9999px';
14894 //		ymdiv.style.position='absolute';
14895 //		document.body.appendChild(ymdiv);
14896 		var h='';
14897 		if(!egeok)
14898 			h=('<!-- Yandex.Metrika counter -->'+
14899 			'<script type="text/javascript">'+
14900 			'(function (d, w, c) { (w[c] = w[c] || []).push(function() {'+
14901 			' try { w.yaCounter22534447 = new Ya.Metrika({id:22534447, clickmap:true, trackLinks:true, accurateTrackBounce:true, trackHash:true}); } catch(e) { } }); var n = d.getElementsByTagName("script")[0], s = d.createElement("script"), f = function () { n.parentNode.insertBefore(s, n); }; s.type = "text/javascript"; s.async = true; s.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//mc.yandex.ru/metrika/watch.js"; if (w.opera == "[object Opera]") { d.addEventListener("DOMContentLoaded", f, false); } else { f(); } })(document, window, "yandex_metrika_callbacks");</script>'+
14902 			'<noscript><div><img src="//mc.yandex.ru/watch/22534447" style="position:absolute; left:-9999px;" alt="" /></div></noscript>'+
14903 			'<!-- /Yandex.Metrika counter -->');
14904 		h+=('<!--LiveInternet counter--><script type="text/javascript">'+
14905 		'document.write("<a href=\'http://www.liveinternet.ru/click\' target=_blank>'+
14906 		'<img src=\'//counter.yadro.ru/hit?t22.6;r" + escape(referrer) + ((typeof(screen)=="undefined")?"":";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?screen.colorDepth:screen.pixelDepth)) +'+
14907 		' ";u" + escape(document.URL) +";h"+escape(document.title.substring(0,80)) +'+
14908 		'  ";" + Math.random() + "\' border=0 width=88 height=31 alt=\'\' '+
14909 		'title=\'LiveInternet: показано число просмотров за 24 часа, посетителей за 24 часа и за сегодня\'>'+
14910 		'<\/a>")</script><!--/LiveInternet-->');
14911 //		if(!(document.location.href.search('/sh/')+1)
14912 			document.write(h.vTag('div','hidden style="display:none;position:absolute;top:-9999px;"'));
14913 //		ymdiv.innerHTML=h;
14914 //		console.log('Счётчики добавлены');
14915 	}
14916 //});
14917 console.log('yametrika.js отработал');
14918 }catch(e){
14919 console.log('yametrika.js завершился с ошибкой');
14920 console.log(e);
14921 }
14922 
14923 var bIE=0;
14924 var bOpera=0;
14925 var bApple=0;
14926 var bGecko=0;
14927 var strBrowser='Chromium-based';
14928 if (!"\v1") {
14929 	bIE=1;
14930 	strBrowser='"MS Internet Explorer", жёстко привязанный к закрытой ОС "Microsoft Windows"';
14931 }
14932 if (/*@cc_on!@*/0) {
14933 	bIE=1;
14934 	strBrowser='"MS Internet Explorer", жёстко привязанный к закрытой ОС "Microsoft Windows"';
14935 }
14936 if (navigator.userAgent.search('Trident')+1) {
14937 	bIE=1;
14938 	strBrowser='"MS Internet Explorer", жёстко привязанный к закрытой ОС "Microsoft Windows"';
14939 }
14940 if (self.opera) {
14941 	bOpera=1;
14942 	strBrowser='"Opera"';
14943 }
14944 if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
14945 	strBrowser='устройств "iPhone" или "iPod"';
14946 	bApple=1;
14947 }
14948 if(navigator.userAgent.match('Gecko/')){
14949 	strBrowser='Mozilla Firefox или ему подобный';
14950 	bGecko=1;
14951 }
14952 
14953 var strpr='Вероятно, Вы используете проприетарный браузер '+strBrowser;
14954 if(bIE && !(location.href.match('ege-ok.ru')||document.referrer.match('ege-ok.ru'))){
14955 	alert(strpr+
14956 		'\n\rТренажёр правильно работает в браузерах Firefox, Chromium, Google Chrome, Интернет.Mail.Ru и т. д.\n\rВ браузерах Internet Explorer и Opera тренажёр может не работать.');
14957 }
14958 
14959 if(bIE+bOpera+bApple) {
14960 	document.write('<center><div id="browser"><font color="red" size="5">'+strpr+'.<br/>  Система "Час ЕГЭ" официально не предназначалась и, скорее всего, не будет предназначаться для работы в проприетарных браузерах.</font><br/>Возможно, некоторые элементы будут работать.<br/>'+
14961 		'<button onclick="document.getElementById(\'browser\').innerHTML=\'\';" >Свернуть это предупреждение</button></div>'+
14962 		'<div class="predupr">Настоятельно рекомендуем Вам скачать <a href="http://mozilla-russia.org/">Firefox</a> или <a href="https://www.google.com/intl/ru/chrome/browser/">Chrome</a></div></center>');
14963 }
14964 
14965 if(!window.chas)
14966 	window.chas={};
14967 
14968 if(bIE){
14969 	chas.integrate=function(){
14970 			document.write('Ваш браузер не поддерживается модулем интеграции.');
14971 	}
14972 }else{
14973 	chas.integratedCount=0;
14974 	chas.integrate=function(href,strn,width,height,predupr){
14975 		if(!height){
14976 			height='1500';
14977 		}
14978 		if(!width){
14979 			width='900';
14980 		}
14981 		if(!strn){
14982 			strn={};
14983 		}
14984 		if(!href){
14985 			href="https://www.math.vsu.ru/chas-ege/sh/sluch.html";
14986 		}
14987 		strn.iframe={nomer:chas.integratedCount};
14988 		document.write(
14989 			'<iframe'+
14990 				' src="'+href.split('#')[0]+'#'+encodeURIComponent(JSON.stringify(strn))+'"'+
14991 				' width="'+width+'"'+
14992 				' height="'+height+'"'+
14993 				' id="chas-integrated-iframe'+chas.integratedCount+'"'+
14994 			'></iframe>'
14995 		);
14996 		if(predupr)try{
14997 			document.getElementById(predupr).innerHTML='';
14998 		}catch(e){};
14999 		chas.integratedCount++;
15000 	}
15001 	
15002 	chas.parseWindowMessage=function(mes){
15003 		if(!mes.data.chasMessage)
15004 			return;
15005 		if(!mes.data.chasMessage.iframeHeight)
15006 			return;
15007 		var ifr=mes.data.chasMessage.iframeHeight;
15008 		for(var i=0;i<=chas.integratedCount;i++)
15009 			if(ifr[i])
15010 				document.getElementById('chas-integrated-iframe'+i).height=ifr[i];
15011 	};
15012 	window.addEventListener("message",chas.parseWindowMessage,false);
15013 	
15014 	chas.postMessagesWidth=function(){
15015 		for(var i=0;i<chas.integratedCount;i++){
15016 			var elem=document.getElementById('chas-integrated-iframe'+i);
15017 			elem.contentWindow.postMessage(
15018 			{
15019 				chasMessage:{
15020 					iframeWidth:window.getComputedStyle(elem).width.replace(/px/,''),
15021 				},
15022 			}
15023 			,'*');
15024 		}
15025 	};
15026 	setInterval(chas.postMessagesWidth,256);
15027 
15028 	//Эти две строки, кажется, надо бы выкинуть. Но вдруг что-нибудь сломается.
15029 	chas.resizeIframes=function(interval){
15030 		setInterval(chas.resizeIframesOnce,interval);
15031 	}
15032 }
15033 try{
15034 	var cashdiv=document.createElement('div');
15035 	cashdiv.style.top='-9999px';
15036 	cashdiv.style.position='absolute';
15037 	cashdiv.style.display='none';
15038 	document.body.appendChild(cashdiv);
15039 	cashdiv.innerHTML='$'+'0123456789=+-\\cdot'+latbukv.soed()+'\\in'+
15040 		latbukv.soed().toLowerCase()+'\\sin\\cos\\ln\\log\\lg 2'+
15041 		'\\def\\tg{\\mathrm{tg~}}'+
15042 		'\\def\\ctg{\\mathrm{ctg~}}'+
15043 		'$';
15044 $(window).load(function(){
15045 	if(!window.mjConfig)
15046 		window.mjConfig='TeX-AMS_HTML-full';
15047 	chas.libs.fileMathJax='MathJax.js?config='+mjConfig+'&locale=ru';
15048 	if(svinta || chas.mode.offline){
15049 		zagr(chas.libs. localMathJax+chas.libs.fileMathJax);
15050 	}else{
15051 		zagr(chas.libs.remoteMathJax+chas.libs.fileMathJax);
15052 	}
15053 });
15054 console.log('cache.js отработал');
15055 }catch(e){
15056 console.log('cache.js завершился с ошибкой');
15057 console.log(e);
15058 }
15059 window.sovety=[
15060 'Это - экспериментальная, тестовая версия программы.<br/>В ней могут быть ошибки и неполадки.',
15061 'Все замечания и предложения отправляйте<br/>на адрес nickkolok@mail.ru',
15062 'Программа "Час ЕГЭ" корректно работает<br/>только в <a href="../doc/systreb.html" target="_blank">поддерживаемых браузерах</a>.',
15063 'В тренажёре иногда используются статистические данные,<br/>например, о погоде или ценах. Эти данные являются<br/>автоматически сгенерированными, а <i>не</i> реальными.',
15064 'Одна из разработчиц "Час ЕГЭ", Настя Червинская, срочно и <br/>бесплатно отдаёт котят в хорошие руки. Связаться с ней<br/> можно <a href="https://vk.com/kitten112007" target="_blank">ВКонтакте</a> или по телефону 8 (951) 5519607',
15065 //'<br/>16.05.2014 в 15-00 в ауд. 430 Главного корпуса ВГУ состоится<br/>бесплатная лекция проф. Глушко, главы экзаменационной <br/>комиссии по математике. Приглашаются все желающие!',
15066 'Математический факультет ВГУ - это <br/>высококвалифицированный профессорско-преподавательский <br/> состав и увлекательная студенческая жизнь.',
15067 'Математический факультет ВГУ - это <br/>отличная профессиональная подготовка <br/>для работы в различных сферах деятельности.',
15068 'Математический факультет ВГУ - это <br/>увлекательная студенческая жизнь и весёлый,<br/>доброжелательный, жизнерадостный коллектив.',
15069 'Если Вам близка математика, Вы хотите стать специалистом, <br/>владеющим современными информационными технологиями и<br/> технологиями математического моделирования<br/>– ждем Вас на математическом факультете!',
15070 'Вы можете <a href="../doc/oprosy.html"  target="blank">проголосовать</a> за то, <br/>что будет добавлено в "Час ЕГЭ"<br/>в ближайшем еженедельном выпуске.',
15071 '"Час ЕГЭ" содержит задания ЕГЭ по математике от 1 до 15 - <br/>в соответствии с проектом тестовой части<br/>профильного уровня ЕГЭ-2015.',
15072 'Набор заданий тренажёра "Час ЕГЭ" по математике <br/>основан на <a href="http://mathege.ru/" target="_blank">Открытом банке заданий</a>,<br/>но не повторяет его в точности.',
15073 //'<br/>9 февраля, в воскресенье, в 10:00, Математический<br/>факультет проводит день открытых дверей<br/>в Главном корпусе ВГУ (Университетская пл., 1), ауд. 435',
15074 //'Дорогие старшеклассники! Вы можете попробовать свои силы<br/>на бесплатном пробном ЕГЭ по математике (с оценкой от экспертов),<br/>а также посетить бесплатные консультации, которые ведут<br/>преподаватели математического факультета. <a href="https://www.math.vsu.ru/index.php?option=com_content&view=article&id=49:%D0%BF%D1%80%D0%BE%D0%B1%D0%BD%D1%8B%D0%B9-%D0%B5%D0%B3%D1%8D-%D0%B8-%D0%BA%D0%BE%D0%BD%D1%81%D1%83%D0%BB%D1%8C%D1%82%D0%B0%D1%86%D0%B8%D0%B8-%D0%B4%D0%BB%D1%8F-%D0%B0%D0%B1%D0%B8%D1%82%D1%83%D1%80%D0%B8%D0%B5%D0%BD%D1%82%D0%BE%D0%B2&catid=11:abiturientu&Itemid=101">Подробнее...</a>',
15075 ].shuffle();
15076 function fixHeight(){
15077 	var br = [];
15078 	for (var i = 0; i < window.sovety.length; i++) {
15079 		var pos = -1;
15080 		br[i] = 0;
15081 		// Ищем сколько раз встречается "<br/>"" в каждом элементе window.sovety и записываем значения в массив br
15082 		while ( ((pos = window.sovety[i].indexOf('<br/>', pos+1)) != -1)) {
15083 			br[i]++;
15084 		}
15085 	}
15086 	// Ищем максимальное кол-во "<br/>"
15087 	var max = Math.max.apply(0, br);
15088 	// Меняем высоту #inf в зависимости от строк в самом длинном совете
15089 	$(function(){
15090 			$('#inf').css({height:(24 * (max + 1))});
15091 	});
15092 }
15093 function informer(){
15094 	var i;
15095 	document.write('<div id="inf">');
15096 	document.write('<ul id="sovety">');
15097 	for(i=0;i<window.sovety.length;i++){
15098 		document.write('<li><div class="lisov">');
15099 		document.write(window.sovety[i]);
15100 		document.write('</div></li>');
15101 	}
15102 	document.write('</ul>');
15103 	document.write('</div>');
15104 	$(function(){'use strict';
15105 		$('#sovety').anythingSlider({
15106 			forwardText         : ">",
15107 			backText         	: "<",
15108 			hashTags			:false,
15109 //			expand				:true,
15110 			startPanel			:1,
15111 			theme				:'minimalist-square',
15112 			buildNavigation		:false,
15113 			buildStartStop		:false,
15114 			resizeContents  	:false,
15115 			enableKeyboard		:false,
15116 			autoPlay			:true,
15117 			delay				:10000,
15118 		});
15119 	});
15120 }
15121 fixHeight();
15122 informer();
15123 /*
15124 Атрибуты (HTML5-data-)
15125 * data-jstorage-id - идентификатор элемента в jStorage. Обязателен!
15126 * data-jstorage-ne - не отслеживать (через пробел)
15127 * 	zn - значение
15128 * 	vi - видимость
15129 * 	ih - innerHTML
15130 */
15131 
15132 /*
15133 Attributes (HTML5-data-)
15134 * data-jstorage-id - identifier to link the element in jStorage with. Necessary!
15135 * data-jstorage-ne - do not track (divided by space)
15136 * 	zn - value
15137 * 	vi - visibility
15138 * 	ih - innerHTML
15139 */
15140 
15141 //Загрузить данные
15142 //Load data
15143 $.jStorage.zagrData=function(){
15144 	var storedData=$.jStorage.get('data-jstorage');
15145 	if(!storedData)
15146 		return;
15147 	[].slice.call(document.querySelectorAll('*[data-jstorage-id]'),0).map(
15148 		function(th){'use strict';
15149 			try{
15150 				var stor=storedData[th.getJStorageId()];
15151 				if(stor){
15152 					var ne=th.getAttribute('data-jstorage-ne');
15153 					ne=ne?ne:'';
15154 					if(!ne.match('zn')){
15155 						th.checked=stor.checked;
15156 						th.value=stor.value;
15157 					}
15158 					if(!ne.match('ih'))
15159 						th.innerHTML=stor.innerHTML;
15160 					if(!ne.match('vi'))
15161 						th.style.display=stor.style.display;
15162 				}
15163 			}catch(e){
15164 				console.log(th,' - ошибка в jStorage.zapomni');
15165 				console.log(th,' - error in jStorage.zapomni');
15166 			}
15167 		}
15168 	);
15169 };
15170 
15171 //Сохранить данные
15172 //Save data
15173 $.jStorage.sohrData=function(){
15174 	var storedData=$.jStorage.get('data-jstorage');
15175 	if(!storedData)
15176 		storedData={};
15177 	[].slice.call(document.querySelectorAll('*[data-jstorage-id]'),0).map(
15178 		function(th){'use strict';
15179 			try{
15180 				var jstid=th.getJStorageId();
15181 				var stor=storedData[jstid];
15182 				if(!stor){
15183 					storedData[jstid]={};
15184 					stor=storedData[jstid];
15185 				}
15186 				var ne=th.getAttribute('data-jstorage-ne');
15187 				ne=ne?ne:'';
15188 				if(!ne.match('zn')){
15189 					stor.checked=th.checked;
15190 					stor.value=th.value;
15191 				}
15192 				if(!ne.match('ih'))
15193 					stor.innerHTML=th.innerHTML;
15194 				if(!stor.style)
15195 					stor.style={};
15196 				if(!ne.match('vi'))
15197 					stor.style.display=th.style.display;
15198 			}catch(e){
15199 				console.log(th,' - ошибка в jStorage.zapomni');
15200 				console.log(th,' - error in jStorage.zapomni');
15201 			}
15202 		}
15203 	);
15204 	$.jStorage.set('data-jstorage',storedData)
15205 };
15206 
15207 HTMLElement.prototype.getJStorageId=function(){
15208 	return this.getAttribute('data-jstorage-id');
15209 }
15210 
15211 //Объявили свой метод у HTMLElement.prototype - сделаем его неперечислимым
15212 //Since we have created a new method in HTMLElement.prototype , we should make the method unenumerable
15213 Object.defineProperty(HTMLElement.prototype, "getJStorageId", { enumerable: false });
15214